1 # -*- coding: utf-8 -*-
2 # This file is part of PrawoKultury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 from django.conf import settings
6 from django.contrib import admin
7 from events.models import Event
8 from migdal.helpers import translated_fields
11 class EventAdmin(admin.ModelAdmin):
13 (None, {'fields': ('date', 'date_end', 'link')}),
16 ('published_%s' % lc),
21 for lc, ln in settings.LANGUAGES
23 list_display = translated_fields(
24 ('title', 'place', 'organizer', 'published'), settings.LANGUAGES
26 date_hierarchy = 'date'
27 list_filter = translated_fields(('published',))
30 admin.site.register(Event, EventAdmin)