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).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-tinycontent-0.1.2.tar.gz
.
File metadata
- Download URL: django-tinycontent-0.1.2.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a670f96557cdbd9cd832167dd7d19d3b5f143d0bc7903c3b8b81a901b74226a |
|
MD5 | c571ac1dd3a8311f1d182f60c5b5369a |
|
BLAKE2b-256 | 0815243c0ae0aca23dddcdf6a2ed7c05052428f3b8b42b8241da0c5f7426c98d |