skip to navigation
skip to content

Not Logged In

django-siteblocks 0.2.1

Reusable application for Django introducing URL-dependent static and dynamic data blocks

http://github.com/idlesign/django-siteblocks

https://pypip.in/d/django-siteblocks/badge.png

What's that

django-siteblocks is a reusable application for Django to build blocks of static or dynamic data that could be used in templates.

It allows you to describe data that doesn't clearly belong to any application in your project in terms of static or dynamic blocks, that could be rendered in certain places on site pages. These blocks are addressed in templates by their aliases.

Two siteblock types are supported:

  • Static. Those are defined using Django Admin contrib and are linked to certain URLs.

    This allows different siteblock contents on different URLs.

  • Dynamic. Those are ordinary Python functions registered as siteblocks returning contents.

    This allows complex logic to build siteblock contents.

If one and the same siteblock has more than one content associated with it, rendered content will be chosen randomly.

Yeah, you're right, that could be used to render random quotes on your site.

 
File Type Py Version Uploaded on Size
django-siteblocks-0.2.1.tar.gz (md5) Source 2014-01-29 21KB
  • Downloads (All Versions):
  • 25 downloads in the last day
  • 62 downloads in the last week
  • 338 downloads in the last month