|
@ -325,14 +325,14 @@ admin.site.register(Rocnik, RocnikAdmin) |
|
|
class ReseniAdmin(VersionAdmin): |
|
|
class ReseniAdmin(VersionAdmin): |
|
|
#form = autocomplete_light.modelform_factory(Reseni, autocomplete_fields=['problem', 'resitele'], fields=['problem', 'resitele']) |
|
|
#form = autocomplete_light.modelform_factory(Reseni, autocomplete_fields=['problem', 'resitele'], fields=['problem', 'resitele']) |
|
|
fieldsets = [ |
|
|
fieldsets = [ |
|
|
(None, {'fields': ['problem', 'resitele', 'forma', 'body', 'cislo_body', 'timestamp']}), |
|
|
(None, {'fields': ['problem__set', 'resitele__set', 'forma', 'cas_doruceni']}), |
|
|
(u'Poznámky', {'fields': ['poznamka']}), |
|
|
(u'Poznámky', {'fields': ['poznamka']}), |
|
|
] |
|
|
] |
|
|
readonly_fields = ['timestamp'] |
|
|
readonly_fields = ['cas_doruceni'] |
|
|
list_display = ['problem', 'resitele', 'forma', 'body', 'timestamp', 'cislo_body'] |
|
|
list_display = [ProblemInline, ResitelInline, 'forma', 'cas_doruceni'] |
|
|
list_filter = ['body', 'timestamp', 'forma'] |
|
|
list_filter = ['cas_doruceni', 'forma'] |
|
|
search_fields = [] |
|
|
search_fields = [] |
|
|
inlines = [PrilohaReseniInline] |
|
|
inlines = [PrilohaReseniInline,ProblemInline,ResitelInline] |
|
|
view_on_site = False |
|
|
view_on_site = False |
|
|
|
|
|
|
|
|
def get_queryset(self, request): |
|
|
def get_queryset(self, request): |
|
|