django-snippetology

A text snippet manager for Django
Download

django-snippetology Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Matt Youell
  • Publisher web site:
  • http://code.google.com/u/softbuilder/

django-snippetology Tags


django-snippetology Description

A text snippet manager for Django django-snippetology is a Django plugin that lets you pull text snippets from the database and inject them into your Django templates (or directly into your view code).Snippetology lets you pull text snippets from the database and inject them into your Django templates (or directly into your view code). If text sounds boring, it shouldn't - the snippets can be any HTML content including flash or image tags, regular markup, CSS, Javascript, etc..This is a very simple but commonly requested CMS feature, where content can be changed dynamically by a trusted non-technical administrator. Snippet text is editable from the regular Django admin panel and the output text appears anywhere you place the matching snippet tag in your template.A randomizing filter is also included that will let you randomly emit lines from a particular snippet. This can be handy for page taglines or rotating banner ads, etc.Using Snippets1. Go into your Django admin and create some snippets in the Snippetology section. Careful - the name you give your snippet will be the name you use in your template.2. Add the command {% load snippets %} toward the top of your template file.3. To use a snippet add a snippet tag to your template: {% snippet "daily message" %} where "daily message" is an example snippet name. Randomizing SnippetsThe random_line tag will randomly select one line out of a snippet full of lines of text. Blank lines are ignored. To use the randomizing feature:1. Create a snippet with multiple lines of text.2. Use the following tag to randomly choose and display a line: {% filter random_line %}{% snippet "rotating_banner_list" %}{% endfilter %}Important NotesSnippetology is appropriate to workgroup sites, intranets, and low volume public websites. Running unmodified on higher volume sites probably isn't a great idea because of the database hits you'd rack up. Caching support and other performance features are in the works but are not a priority at this time. Suffice it to say that if you're not running a high volume website you likely won't experience performance problems with Snippetology. Requirements: · Python · Django


django-snippetology Related Software