|
@ -107,6 +107,18 @@ class PrilohaReseniInline(admin.StackedInline): |
|
|
extra = 0 |
|
|
extra = 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ProblemInline(admin.TabularInline): |
|
|
|
|
|
model = Problem |
|
|
|
|
|
fk_name = 'cislo_zadani' |
|
|
|
|
|
fields = ['kod', 'typ', 'nazev', 'body', 'opravovatel', 'stav'] |
|
|
|
|
|
formfield_overrides = { |
|
|
|
|
|
models.TextField: {'widget': forms.TextInput}, |
|
|
|
|
|
} |
|
|
|
|
|
view_on_site = Problem.verejne_url |
|
|
|
|
|
|
|
|
|
|
|
extra = 0 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ReseniKProblemuInline(admin.TabularInline): |
|
|
class ReseniKProblemuInline(admin.TabularInline): |
|
|
form = autocomplete_light.modelform_factory(Reseni, autocomplete_fields=['resitel'], fields=['resitel']) |
|
|
form = autocomplete_light.modelform_factory(Reseni, autocomplete_fields=['resitel'], fields=['resitel']) |
|
|
model = Reseni |
|
|
model = Reseni |
|
@ -244,6 +256,7 @@ class CisloAdmin(VersionAdmin): |
|
|
make_set_action('verejna_vysledkovka', True, u'Zveřejnit výsledkovku'), |
|
|
make_set_action('verejna_vysledkovka', True, u'Zveřejnit výsledkovku'), |
|
|
make_set_action('verejna_vysledkovka', False, u'Skrýt (zneveřejnit) výsledkovku'), |
|
|
make_set_action('verejna_vysledkovka', False, u'Skrýt (zneveřejnit) výsledkovku'), |
|
|
] |
|
|
] |
|
|
|
|
|
inlines = [ProblemInline] |
|
|
|
|
|
|
|
|
def get_queryset(self, request): |
|
|
def get_queryset(self, request): |
|
|
qs = super(CisloAdmin, self).get_queryset(request) |
|
|
qs = super(CisloAdmin, self).get_queryset(request) |
|
|