django-siteblocks 0.1.1
Reusable application for Django introducing URL-dependent static data blocks (flatblocks).
http://github.com/idlesign/django-siteblocks
What's that
django-siteblocks is a reusable application for Django introducing blocks of static data (also known as flatblocks) that could be used in templates. These blocks are rendered in templates dependant on current URL.
Requirements
- Django 1.1+
- 'Admin site' Django contrib package
How to use
- Add the 'siteblocks' application to 'INSTALLED_APPS' in your settings file (usually 'settings.py').
- Run './manage.py syncdb' to install siteblocks table into database.
- Go to Django Admin site and add some site blocks.
- Add '{% load siteblocks %}' tag to the top of a template.
- Add '{% siteblock "myblock" %}' tag where you need it in template. Here 'myblock' is the alias of a block. NB: You can always put into quotes a template variable.
Use '{% siteblock "myblock" as myvar %}' tag notation to put block contents into 'myvar' variable instead of rendering.
Translating django-siteblocks
You can translate application into your language if it is supported by Django. For translation tips refer to Django documentation: http://docs.djangoproject.com/en/1.1/topics/i18n/localization/
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| django-siteblocks-0.1.1.tar.gz (md5) | Source | 2010-10-13 | 9KB | 336 | |
- Author: Igor 'idle sign' Starikov
- Home Page: http://github.com/idlesign/django-siteblocks
- Categories
- Package Index Owner: idlesign
- DOAP record: django-siteblocks-0.1.1.xml
