Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install django-siteblocks

How to install django-siteblocks

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install django-siteblocks
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.1.1 Available View build log
Windows (64-bit)
0.1.1 Available View build log
Mac OS X (10.5+)
0.1.1 Available View build log
Linux (32-bit)
0.1.1 Available View build log
Linux (64-bit)
0.1.1 Available View build log
 
Dependencies
Lastest release
version 0.1.1 on Jan 5th, 2011

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

  1. Django 1.1+
  2. 'Admin site' Django contrib package

How to use

  1. Add the 'siteblocks' application to 'INSTALLED_APPS' in your settings file (usually 'settings.py').
  2. Run './manage.py syncdb' to install siteblocks table into database.
  3. Go to Django Admin site and add some site blocks.
  4. Add '{% load siteblocks %}' tag to the top of a template.
  5. 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/

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.