|
@ -201,6 +201,13 @@ class CisloAdmin(reversion.VersionAdmin): |
|
|
list_display = ['kod', 'rocnik', 'cislo', 'datum_vydani', 'datum_deadline', 'verejne', 'verejna_vysledkovka'] |
|
|
list_display = ['kod', 'rocnik', 'cislo', 'datum_vydani', 'datum_deadline', 'verejne', 'verejna_vysledkovka'] |
|
|
list_filter = ['rocnik'] |
|
|
list_filter = ['rocnik'] |
|
|
view_on_site = Cislo.verejne_url |
|
|
view_on_site = Cislo.verejne_url |
|
|
|
|
|
actions = [ |
|
|
|
|
|
make_set_action('verejne_db', True, u'Zveřejnit číslo'), |
|
|
|
|
|
make_set_action('verejne_db', False, u'Skrýt (zneveřejnit) číslo'), |
|
|
|
|
|
make_set_action('verejna_vysledkovka', True, u'Zveřejnit výsledkovku'), |
|
|
|
|
|
make_set_action('verejna_vysledkovka', False, u'Skrýt (zneveřejnit) výsledkovku'), |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
def get_queryset(self, request): |
|
|
def get_queryset(self, request): |
|
|
qs = super(CisloAdmin, self).get_queryset(request) |
|
|
qs = super(CisloAdmin, self).get_queryset(request) |
|
|
return qs.select_related('rocnik') |
|
|
return qs.select_related('rocnik') |
|
@ -216,6 +223,10 @@ class RocnikAdmin(reversion.VersionAdmin): |
|
|
list_display = ['rocnik', 'prvni_rok', 'exportovat', 'verejne'] |
|
|
list_display = ['rocnik', 'prvni_rok', 'exportovat', 'verejne'] |
|
|
inlines = [CisloInline] |
|
|
inlines = [CisloInline] |
|
|
view_on_site = Rocnik.verejne_url |
|
|
view_on_site = Rocnik.verejne_url |
|
|
|
|
|
actions = [ |
|
|
|
|
|
make_set_action('exportovat', True, u'Nastavit pro AESOP export'), |
|
|
|
|
|
make_set_action('exportovat', False, u'Skrýt pro AESOP export'), |
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
admin.site.register(Rocnik, RocnikAdmin) |
|
|
admin.site.register(Rocnik, RocnikAdmin) |
|
|
|
|
|
|
|
|