|
|
@ -51,8 +51,9 @@ class CisloAdmin(reversion.VersionAdmin): |
|
|
|
(u'Data', {'fields': ['datum_vydani', 'datum_deadline']}), |
|
|
|
] |
|
|
|
list_display = ['kod', 'rocnik', 'cislo', 'datum_vydani', 'datum_deadline', 'verejne'] |
|
|
|
list_display_links = ['rocnik'] |
|
|
|
list_display_links = ['cislo', 'kod'] |
|
|
|
list_filter = ['rocnik'] |
|
|
|
view_on_site = Cislo.verejne_url |
|
|
|
|
|
|
|
admin.site.register(Cislo, CisloAdmin) |
|
|
|
|
|
|
@ -69,6 +70,7 @@ class RocnikAdmin(reversion.VersionAdmin): |
|
|
|
] |
|
|
|
list_display = ['rocnik', 'prvni_rok', 'verejne'] |
|
|
|
inlines = [CisloInline] |
|
|
|
view_on_site = Rocnik.verejne_url |
|
|
|
|
|
|
|
admin.site.register(Rocnik, RocnikAdmin) |
|
|
|
|
|
|
@ -111,6 +113,7 @@ admin.site.register(Reseni, ReseniAdmin) |
|
|
|
|
|
|
|
class ReseniInline(admin.TabularInline): |
|
|
|
model = Reseni |
|
|
|
readonly_fields = ['poznamka'] |
|
|
|
extra = 0 |
|
|
|
|
|
|
|
|
|
|
@ -131,11 +134,13 @@ class ProblemAdmin(reversion.VersionAdmin): |
|
|
|
(u'Vydání', {'fields': ['cislo_zadani', 'kod', 'cislo_reseni', 'opravovatel']}), |
|
|
|
(u'Texty', {'fields': ['text_problemu', 'text_problemu_org']}), |
|
|
|
] |
|
|
|
list_display = ['kod', 'nazev', 'typ', 'stav', 'autor', 'opravovatel', 'verejne', 'cislo_zadani'] |
|
|
|
list_display_links = ['autor', 'opravovatel', 'cislo_zadani'] |
|
|
|
list_display = ['nazev', 'typ', 'kod', 'stav', 'autor', 'opravovatel', 'verejne', 'cislo_zadani'] |
|
|
|
list_select_related = True |
|
|
|
list_display_links = ['nazev'] |
|
|
|
list_filter = ['typ', 'stav', 'autor', 'opravovatel'] |
|
|
|
search_fields = ['nazev', 'kod', 'text_problemu_org', 'text_problemu'] |
|
|
|
inlines = [ReseniInline] |
|
|
|
view_on_site = Problem.verejne_url |
|
|
|
|
|
|
|
admin.site.register(Problem, ProblemAdmin) |
|
|
|
|
|
|
@ -149,5 +154,6 @@ class SoustredeniAdmin(reversion.VersionAdmin): |
|
|
|
] |
|
|
|
list_display = ['rocnik', 'misto', 'datum_zacatku', 'verejne'] |
|
|
|
list_filter = ['rocnik'] |
|
|
|
view_on_site = Soustredeni.verejne_url |
|
|
|
|
|
|
|
admin.site.register(Soustredeni, SoustredeniAdmin) |
|
|
|