Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Simple app for managing small blocks of text/html.

Project Description


.. image::


1. Add ``textblocks`` and optionally ``modeltranslation`` to
2. Add an entry for ``textblocks`` to your ``MIGRATION_MODULES``
(textblocks cannot ship its own migrations because the exact schema
depends on your ``LANGUAGES`` setting) and create an empty Python
module (folder with an empty ```` file).
3. Run ``./ makemigrations textblocks`` and ``./ migrate``


1. Load templatetags ``{% load textblock_tags %}``
2. Add ``textblock`` tags with unique identifiers::

{% textblock "introduction" %}

Text blocks with identifiers that do not exist in the database yet will
automatically be created.

You can optionally provide the following keyword arguments:

============== ============================================================================================= =================================== ================
Argument Description Possible Values Default
============== ============================================================================================= =================================== ================
``type`` Sets the content type. ``text/plain``, ``text/html`` ``text/plain``
``show_key`` If set to true, the template will render the textblock key for textblocks without a value. ``False``, ``0``, ``True``, ``1`` ``False``
============== ============================================================================================= ==================================== ================

The default value for the ``show_key``-option can be overriden with the
``TEXTBLOCKS_SHOWKEY = True``-setting.

Release History

This version
History Node


History Node


History Node


History Node


Download Files

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

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(6.2 kB) Copy SHA256 Hash SHA256
Source Feb 8, 2018

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting