Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Reusable application for Django to build blocks of static or dynamic data that could be used in templates.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 docs
Octocat-spinner-32 siteblocks
Octocat-spinner-32 AUTHORS
Octocat-spinner-32 CHANGELOG
Octocat-spinner-32 LICENSE
Octocat-spinner-32 MANIFEST.in
Octocat-spinner-32 README.rst
Octocat-spinner-32 setup.py
Octocat-spinner-32 tox.ini
README.rst

django-siteblocks

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.

Documentation

http://django-siteblocks.readthedocs.org/

https://d2weczhvl823v0.cloudfront.net/idlesign/django-siteblocks/trend.png
Something went wrong with that request. Please try again.