From 687b6d37b2cbe434a63bd226a80bebd56bb72e1d Mon Sep 17 00:00:00 2001 From: "Tomas \"Jethro\" Pokorny" Date: Tue, 30 Apr 2019 21:46:57 +0200 Subject: [PATCH] Fix ReseniAdmin --- seminar/admin.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/seminar/admin.py b/seminar/admin.py index ceff6759..70a42c9f 100644 --- a/seminar/admin.py +++ b/seminar/admin.py @@ -325,14 +325,14 @@ admin.site.register(Rocnik, RocnikAdmin) class ReseniAdmin(VersionAdmin): #form = autocomplete_light.modelform_factory(Reseni, autocomplete_fields=['problem', 'resitele'], fields=['problem', 'resitele']) fieldsets = [ - (None, {'fields': ['problem', 'resitele', 'forma', 'body', 'cislo_body', 'timestamp']}), + (None, {'fields': ['problem__set', 'resitele__set', 'forma', 'cas_doruceni']}), (u'Poznámky', {'fields': ['poznamka']}), ] - readonly_fields = ['timestamp'] - list_display = ['problem', 'resitele', 'forma', 'body', 'timestamp', 'cislo_body'] - list_filter = ['body', 'timestamp', 'forma'] + readonly_fields = ['cas_doruceni'] + list_display = [ProblemInline, ResitelInline, 'forma', 'cas_doruceni'] + list_filter = ['cas_doruceni', 'forma'] search_fields = [] - inlines = [PrilohaReseniInline] + inlines = [PrilohaReseniInline,ProblemInline,ResitelInline] view_on_site = False def get_queryset(self, request):