Total Pageviews

Sunday 1 June 2014

django-morsels

Text/HTML content blocks inserted into Django templates.
This app enables admins of a Django site to control the content of text blocks displayed as part of dynamic site templates.
Often, static content is embedded in dynamic templates, making it hard to edit. Using this app, the static content is moved to a morsel, and displayed in the template using a custom template tag.
Morsels are tied to site pages using URL matching, combined with arbitrary names. The use of URL matching means that templates do not have to specify the morsel which is to be used, making it possible to display different morsels when the same template is used to render different site pages.

Features

  • Each morsel can be tied to a site page by specifying the page's URL in the morsel.
  • Different morsels can be used in the same page by adding arbitrary names to the morsel's URL.
  • Morsels can be inherited from higher levels in the site's URL hierarchy. This allows the content of a single morsel to be displayed in a whole site section, while being overriden by other morsels in specific pages within the section.
  • Morsels can include an optional title, which may be used to identify the morsel and may also be displayed in templates using the morsel.
  • Two custom templatetags - morsel and withmorsel - allow morsels to be used in various, flexible ways.
  • Morsels can be locked, which prevents them from being deleted. This is intended to prevent accidental deletion of required morsels.
If the typogrify app is installed, morsel content will be typogrified when rendered using the morsel templatetag.

from http://code.google.com/p/django-morsels/