|
|
@ -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,] |
|
|
|
|
|
|
|