|
|
@ -61,26 +61,32 @@ class ProblemAdmin(PolymorphicParentModelAdmin): |
|
|
|
m.Uloha, |
|
|
|
m.Konfera, |
|
|
|
] |
|
|
|
# Pokud chceme orezavat na aktualni rocnik, musime do modelu pridat odkaz na rocnik. Zatim bere vse. |
|
|
|
search_fields = ['nazev'] |
|
|
|
|
|
|
|
@admin.register(m.Tema) |
|
|
|
class TemaAdmin(PolymorphicChildModelAdmin): |
|
|
|
base_model = m.Tema |
|
|
|
show_in_index = True |
|
|
|
autocomplete_fields = ['nadproblem'] |
|
|
|
|
|
|
|
@admin.register(m.Clanek) |
|
|
|
class ClanekAdmin(PolymorphicChildModelAdmin): |
|
|
|
base_model = m.Clanek |
|
|
|
show_in_index = True |
|
|
|
autocomplete_fields = ['nadproblem'] |
|
|
|
|
|
|
|
@admin.register(m.Uloha) |
|
|
|
class UlohaAdmin(PolymorphicChildModelAdmin): |
|
|
|
base_model = m.Uloha |
|
|
|
show_in_index = True |
|
|
|
autocomplete_fields = ['nadproblem'] |
|
|
|
|
|
|
|
@admin.register(m.Konfera) |
|
|
|
class KonferaAdmin(PolymorphicChildModelAdmin): |
|
|
|
base_model = m.Konfera |
|
|
|
show_in_index = True |
|
|
|
autocomplete_fields = ['nadproblem'] |
|
|
|
|
|
|
|
|
|
|
|
class TextAdminInline(admin.TabularInline): |
|
|
|