django-representations

Django templatetag for representing models
Download

django-representations Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Eric Moritz
  • Publisher web site:
  • http://themoritzfamily.com

django-representations Tags


django-representations Description

Django templatetag for representing models django-representations is a simple template tag that selects a template based on the content type of the model passed to it.This presents a convention that allows models to be displayed in certain waysFor instance, for a list of blog entries:diario/entry_archive_day.html ... {% represent entry as "summary.html" %}diario/entry_archive.html ... {% represent entry as "summary.html" %}diario/entry_detail.html ... {% represent entry as "detail.html" %}Each template is placed in representations/diario.entry/The power of this convention is revealed when you do something like a search engine that may be a list of different content types:{% for object in search_result_list %}{% represent object as "search_result.html" %}{% endfor %} Requirements: · Python · Django


django-representations Related Software