X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/7a47f04940f28745309716d725b63a8278b29e62..a8efde3b7502e1e3b612fe55c62932d06c8a6565:/events/admin.py diff --git a/events/admin.py b/events/admin.py index 0cac1e0..2d85789 100644 --- a/events/admin.py +++ b/events/admin.py @@ -4,13 +4,13 @@ # from django.conf import settings from django.contrib import admin +from fnpdjango.utils.models.translation import translated_fields from events.models import Event -from migdal.helpers import translated_fields class EventAdmin(admin.ModelAdmin): fieldsets = ( - (None, {'fields': ('date', 'link')}), + (None, {'fields': ('date', 'date_end', 'link')}), ) + tuple( (ln, {'fields': ( ('published_%s' % lc), @@ -21,9 +21,10 @@ class EventAdmin(admin.ModelAdmin): for lc, ln in settings.LANGUAGES ) list_display = translated_fields( - ('title', 'place', 'organizer'), settings.LANGUAGES + ('title', 'place', 'organizer', 'published'), settings.LANGUAGES ) + ('date',) date_hierarchy = 'date' + list_filter = translated_fields(('published',)) admin.site.register(Event, EventAdmin)