Skip to content

watchdogpolska/django-tinycontent

This branch is 1 commit ahead of dominicrodger/django-tinycontent:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bb85257 · Feb 21, 2024
Jan 28, 2024
Dec 20, 2023
Feb 21, 2024
Jun 6, 2016
Feb 2, 2020
Aug 16, 2017
May 29, 2013
May 29, 2013
Feb 11, 2020
Jan 28, 2024
Apr 7, 2015
Aug 28, 2016
Feb 11, 2020
Feb 2, 2020

Repository files navigation

*****
WARNING: This code is entirely unsupported, 0.9.0 will be the last
release of django-tinycontent.
*****

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).

To apply custom filters to your content, set ``TINYCONTENT_FILTER`` to
a dotted path to a callable that takes the raw content and returns the
transformed content. You can also set ``TINYCONTENT_FILTER`` to be a
list of dotted paths to callables, to chain filters together.

django-tinycontent supports all versions of Django from 2.0 to
3.0. Python 3.6, 3.7 and 3.8 are supported.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 95.2%
  • Makefile 3.0%
  • HTML 1.8%