Skip to main content

A Django app for managing re-usable blocks of tiny content.

Project description

django-tinycontent is a simple Django application for re-usable content blocks, much like django-boxes.

Installation is simple:

pip install django-tinycontent

Add tinycontent to your INSTALLED_APPS.

Usage in templates is simple:

{% load tinycontent_tags %}

{% tinycontent_simple 'content_name' %}

Or, to specify a value if a content block by the given name cannot be found, use:

{% load tinycontent_tags %}

{% tinycontent 'content_name' %}
This will be shown if no matching object is found.
{% endtinycontent %}

The name of the content block can also be a context variable, using both the simple and the complex variants.

Content blocks themselves can be added and edited using Django’s admin interface. If a block with the name given in the template tag cannot be found, either nothing is rendered (if using tinycontent_simple), or the text between tinycontent and endtinycontent is rendered (if using the more complex variant).

django-tinycontent supports Django 1.4 and Django 1.5. Python 2.6 works with both versions of Django, and Python 3.3 is supported for Django 1.5 Note that using python setup.py test only works for Python 2.x, since django-setuptest does not yet support Python 3.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-tinycontent-0.1.7.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file django-tinycontent-0.1.7.tar.gz.

File metadata

File hashes

Hashes for django-tinycontent-0.1.7.tar.gz
Algorithm Hash digest
SHA256 7498c84804a638af9ccf739caff95065ec2b27d99d63e215eaba0f0bfda6a83a
MD5 fade8c501ced355e75805f5bb0f63f8e
BLAKE2b-256 87f903a28feebefb1908072938b123771edd770e0e7bddd1d951d1ee316b299f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page