FeinCMS 1.6 release notes

Welcome to FeinCMS 1.6!

Backwards-incompatible changes

Reversing application content URLs

The default value of FEINCMS_REVERSE_MONKEY_PATCH has been changed to False. Support for monkey-patching the reverse() method to support the old 'urlconf/viewname' notation will be removed in the 1.7 release.

Improvements to the bundled file and image contents

  • ImageContent, FileContent and VideoContent now have pretty icons out-of-the-box.

  • ImageContent now accepts optional FORMAT_CHOICES for use with FeinCMS’ bundled thumbnailers, as well as caption and alt_text fields.


    If you are upgrading from an earlier version of FeinCMS, you’ll have to add the new database columns yourself or use a migration tool like South to do it for you. Instructions for MySQL and the page module follow:

    ALTER TABLE page_page_imagecontent ADD COLUMN `alt_text` varchar(255) NOT NULL;
    ALTER TABLE page_page_imagecontent ADD COLUMN `caption` varchar(255) NOT NULL;

    If you want to use FORMAT_CHOICES:

    ALTER TABLE page_page_imagecontent ADD COLUMN `format` varchar(64) NOT NULL;
  • FileContent now displays the size of the file in the default template, and uses span elements to allow styling of the title / size.

Removal of deprecated features

  • Deprecated page manager methods have been removed. You should use Page.objects.for_request instead of the following manager methods:
    • Page.objects.page_for_path_or_404()
    • Page.objects.for_request_or_404()
    • Page.objects.best_match_for_request()
    • Page.objects.from_request()
  • Deprecated page methods have been removed:
    • Page.active_children(): Use Page.children.active() instead.
    • Page.active_children_in_navigation(): Use Page.children.in_navigation() instead.
    • Page.get_siblings_and_self(): You probably wanted self.parent.children.active() or self.get_siblings(include_self=True).active() anyway.
  • The shortcuts Page.register_request_processors() and Page.register_response_processors() to register several request or response processors at once have been removed in favor of their counterparts which only allow one processor at a time, but allow for replacing FeinCMS’ included processors, require_path_active_request_processor and redirect_request_processor.
  • It is not possible anymore to access the request and response processors as methods of the Page class. The processors are all in feincms.module.page.processors now.
  • The deprecated support for prefilled attributes has been removed. Use Django’s own prefetch_related or feincms.utils.queryset_transform instead.
  • The deprecated feincms.views.base module has been removed. The code has been moved to feincms.views.legacy during the FeinCMS v1.5 cycle.

New deprecations

  • The view decorator feincms.views.decorators.add_page_to_extra_context has been deprecated as it was mostly used with function-based generic views, which have been deprecated in Django as well. Use Django’s class-based generic views and the feincms.context_processors.add_page_if_missing context processor if you need similar functionality instead.
  • The content type feincms.content.medialibrary.models.MediaFileContent has been deprecated since FeinCMS v1.4. The whole module has been deprecated now and will be replaced with the contents of feincms.content.medialibrary.v2 in FeinCMS v1.7. The v2 module will stay around for another release or two so that code using v2 will continue working with FeinCMS v1.8 (at least).
  • The template tag feincms_navigation has been superseded by feincms_nav which fixes a few problems with the old code and is generally much more maintainable. The old version will stay around for one more version and will be removed for FeinCMS v1.8. The only difference (apart from the bugfixes and the slightly different syntax) is that feincms_nav unconditionally uses navigation extensions. Additionally, feincms_navigation uses feincms_nav‘s implementation behind the scenes, which means that the extended argument does not have an effect anymore (it’s always active).
  • The HTML cleaning support in feincms.utils.html.cleanse which could be easily used in the RichTextContent by passing cleanse=True has been copied into its own Python package, feincms-cleanse. You should start passing a callable to cleanse right now. The existing support for cleansing will only be available up to FeinCMS v1.7.
  • FeinCMS v1.8 will not support shorthands anymore when registering extensions. Always provide the full python path to the extension file (or pass callables) to feincms.models.Base.register_extensions. That is, Page.register_extensions('feincms.module.extensions.ct_tracker') should be used instead of Page.register_extensions('ct_tracker'). While it is a bit more work it will make it much more explicit what’s going on.

Compatibility with Django and other apps

FeinCMS 1.6 requires Django 1.4. If you want to use django-reversion with FeinCMS you have to use django-reversion 1.6 or newer.

Notable features and improvements

  • The bundled content types take additional steps to ensure that the main view context is available in content types’ templates. If you only use the rendering tags (feincms_render_region and feincms_render_content) you can take advantage of all variables from your context processors in content types’ templates too. Furthermore, those templatetags have been simplified by using Django’s template.Library.simple_tag method now, which means that filters etc. are supported as template tag arguments now.
  • MediaFile does no longer auto-rotate images on upload. It really is not a media library’s job to magically modify user content; if needed, it should be done in an image filter (like sorl). Also, reading through the image data seems to have a side effect on some external storage engines which then would only save half the image data, see issue #254. Additionally, FeinCMS does not try anymore to detect whether uploaded files really are images, and only looks at the file extension by default. We did not peek at the contents of other file types either.
  • A new model field has been added, feincms.contrib.richtext.RichTextField. This is a drop-in replacement for Django’s models.TextField with the difference that it adds the CSS classes required by rich text fields in the item editor.
  • The value of FEINCMS_FRONTEND_EDITING defaults to False now.
  • Frontend editing can now safely be used with caching. This is accomplished by saving state in a cookie instead of creating sessions all the time.
  • The SectionContent content type has been updated and does properly use raw_id_fields for the media files instead of the hack which was used before.
  • It is now possible to specify a different function for generating thumbnails in the media library administration. Set the setting FEINCMS_MEDIALIBRARY_THUMBNAIL to a function taking a media file instance and returning a URL to a thumbnail image or nothing if the file type cannot be handled by the thumbnailer.
  • Thumbnails generated by the bundled |thumbnail and |cropscale template filters are stored separately from the uploaded files now. This change means that all thumbnails will be automatically regenerated after a FeinCMS update. If you need the old behavior for some reason, set the setting FEINCMS_THUMBNAIL_DIR to an empty string. The default setting is '_thumbs/'.
  • All templates and examples have been converted to the new {% url %} syntax.
  • Custom comment models are now supported in the CommentsContent.
  • Media files are now removed from the disk too if a media file entry is removed from the database.
  • The modules feincms.module.page.models and feincms.module.medialibrary.models have been split up. Admin code has been moved into modeladmin.py files, form code into forms.py.


  • The core page methods support running with APPEND_SLASH = False now. Many content types using forms do not, however.
  • The MPTT attributes aren’t hardcoded in the tree editor anymore. Custom names for the left, right, level and tree_id attributes are now supported. Models which do not use id as their primary key are supported now as well.
  • FeinCMS uses timezone-aware datetimes now.