diff --git a/seminar/admin.py b/seminar/admin.py index 29954951..8e6d8a96 100644 --- a/seminar/admin.py +++ b/seminar/admin.py @@ -346,7 +346,18 @@ admin.site.register(Novinky, NovinkyAdmin) ### Organizator +def jmeno_organizatora(obj): + return ('%s \"%s\" %s' % + (obj.user.first_name, obj.prezdivka, obj.user.last_name)) +jmeno_organizatora.short_description = 'Jméno organizátora' + +def je_organizator_aktivni(obj): + return obj.user.is_active +je_organizator_aktivni.short_description = 'Aktivní' +je_organizator_aktivni.boolean = True + @admin.register(Organizator) class OrganizatorAdmin(admin.ModelAdmin): list_filter = ['organizuje_do_roku'] + list_display = [jmeno_organizatora, je_organizator_aktivni,]