diff --git a/seminar/admin.py b/seminar/admin.py index 4de42ba6..b41e9063 100644 --- a/seminar/admin.py +++ b/seminar/admin.py @@ -113,7 +113,6 @@ class PrilohaReseniInline(admin.StackedInline): class ProblemInline(admin.TabularInline): model = Problem - fk_name = 'cislo_zadani' fields = ['kod', 'nazev', 'autor', 'garant', 'opravovatele', 'stav'] formfield_overrides = { models.TextField: {'widget': forms.TextInput}, @@ -280,7 +279,7 @@ class CisloAdmin(VersionAdmin): make_set_action('verejna_vysledkovka', True, 'Zveřejnit výsledkovku'), make_set_action('verejna_vysledkovka', False, 'Skrýt (zneveřejnit) výsledkovku'), ] - inlines = [ProblemInline] + #inlines = [ProblemInline] def get_queryset(self, request): qs = super(CisloAdmin, self).get_queryset(request) @@ -329,10 +328,10 @@ class ReseniAdmin(VersionAdmin): (u'Poznámky', {'fields': ['poznamka']}), ] readonly_fields = ['cas_doruceni'] - list_display = [ProblemInline, ResitelInline, 'forma', 'cas_doruceni'] + list_display = [ResitelInline, 'forma', 'cas_doruceni'] list_filter = ['cas_doruceni', 'forma'] search_fields = [] - inlines = [PrilohaReseniInline,ProblemInline,ResitelInline] + inlines = [PrilohaReseniInline,ResitelInline] view_on_site = False def get_queryset(self, request): @@ -459,7 +458,7 @@ class ProblemAdmin(VersionAdmin): def get_queryset(self, request): qs = super(ProblemAdmin, self).get_queryset(request) - return qs.select_related('autor', 'opravovatel', 'cislo_zadani', 'cislo_reseni') + return qs.select_related('autor', 'opravovatel', 'cislo_reseni') def pocet_reseni(self, obj): return obj.pocet_reseni