new fields: gallery, time/place for events
[django-migdal.git] / migdal / admin.py
index f9974be..cf1c514 100644 (file)
@@ -37,15 +37,16 @@ def filtered_entry_admin(typ):
             return field
 
         date_hierarchy = 'date'
-        readonly_fields = ('date', 'changed_at', 'first_published_at') + \
-            translated_fields(('published_at',))
+        readonly_fields = ('date', 'changed_at') + translated_fields(('published_at',))
+        if app_settings.PUBLISH_DATE_EDITABLE:
+            readonly_fields += ('first_published_at',)
         _promo_if_necessary = ('promo',) if typ.promotable else ()
 
         fieldsets = (
             (None, {
                 'fields': _promo_if_necessary + (
                     'in_stream', 'author', 'author_email', 'canonical_url', 'image',
-                    'date', 'first_published_at', 'changed_at')
+                    'date', 'first_published_at', 'changed_at', 'gallery')
                 }),
         ) + tuple(
             (ln, {'fields': (
@@ -55,6 +56,8 @@ def filtered_entry_admin(typ):
                 'slug_%s' % lc,
                 'lead_%s' % lc,
                 'body_%s' % lc,
+                'place_%s' % lc,
+                'time_%s' % lc,
                 )})
             for lc, ln in app_settings.OBLIGATORY_LANGUAGES
         ) + tuple(
@@ -65,6 +68,8 @@ def filtered_entry_admin(typ):
                 'slug_%s' % lc,
                 'lead_%s' % lc,
                 'body_%s' % lc,
+                'place_%s' % lc,
+                'time_%s' % lc,
                 )})
             for lc, ln in app_settings.OPTIONAL_LANGUAGES
         )