X-Git-Url: https://git.mdrn.pl/django-migdal.git/blobdiff_plain/2779a04736253bc7a56ac891cd36d0bfce990ad1..336f39228c9206e9ff728b65f14d838076452a13:/migdal/admin.py diff --git a/migdal/admin.py b/migdal/admin.py index f9974be..cf1c514 100644 --- a/migdal/admin.py +++ b/migdal/admin.py @@ -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 )