|
@ -120,13 +120,13 @@ class ProblemAdmin(admin.ModelAdmin): |
|
|
form = ProblemAdminForm |
|
|
form = ProblemAdminForm |
|
|
# readonly_fields = ['autor'] |
|
|
# readonly_fields = ['autor'] |
|
|
fieldsets = [ |
|
|
fieldsets = [ |
|
|
(None, {'fields': ['nazev', 'typ', 'stav', 'autor']}), |
|
|
(None, {'fields': ['nazev', 'typ', 'stav', 'autor', 'body']}), |
|
|
(u'Vydání', {'fields': ['cislo_zadani', 'kod', 'cislo_reseni', 'opravovatel']}), |
|
|
(u'Vydání', {'fields': ['cislo_zadani', 'kod', 'cislo_reseni', 'opravovatel']}), |
|
|
(u'Texty', {'fields': ['text_problemu', 'text_problemu_org']}), |
|
|
(u'Texty', {'fields': ['text_problemu', 'text_problemu_org']}), |
|
|
] |
|
|
] |
|
|
list_display = ['nazev', 'typ', 'stav', 'autor', 'kod', 'opravovatel'] |
|
|
list_display = ['nazev', 'typ', 'stav', 'autor', 'kod', 'opravovatel'] |
|
|
list_filter = ['typ', 'stav', 'autor', 'opravovatel'] |
|
|
list_filter = ['typ', 'stav', 'autor', 'opravovatel'] |
|
|
search_fields = ['nazev', 'autor', 'kod', 'text_problemu_org', 'text_problemu'] |
|
|
search_fields = ['nazev', 'kod', 'text_problemu_org', 'text_problemu'] |
|
|
inlines = [ReseniInline] |
|
|
inlines = [ReseniInline] |
|
|
|
|
|
|
|
|
admin.site.register(Problem, ProblemAdmin) |
|
|
admin.site.register(Problem, ProblemAdmin) |
|
|