fnp
/
prawokultury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
promobox corner fix
[prawokultury.git]
/
events
/
admin.py
diff --git
a/events/admin.py
b/events/admin.py
index
2fb55d6
..
e75c047
100644
(file)
--- a/
events/admin.py
+++ b/
events/admin.py
@@
-2,7
+2,17
@@
# This file is part of PrawoKultury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
# This file is part of PrawoKultury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
+from django.conf import settings
from django.contrib import admin
from events.models import Event
from django.contrib import admin
from events.models import Event
+from migdal.helpers import translated_fields
-admin.site.register(Event)
+
+class EventAdmin(admin.ModelAdmin):
+ list_display = translated_fields(
+ ('title', 'place', 'organizer'), settings.LANGUAGES
+ ) + ('date',)
+ date_hierarchy = 'date'
+
+
+admin.site.register(Event, EventAdmin)