Skip to main content
https://travis-ci.org/fabiangermann/django-textblocks.svg?branch=master

Installation

  1. Add textblocks and optionally modeltranslation to INSTALLED_APPS

  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 __init__.py file).

  3. Run ./manage.py makemigrations textblocks and ./manage.py migrate

Usage

  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 files for django-textblocks 0.8.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-textblocks 0.8.3
File Size Uploaded
django-textblocks-0.8.3.tar.gz 7.1 kB Details

Release files / django-textblocks-0.8.3.tar.gz

Download URL django-textblocks-0.8.3.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f4e75c0fd6af6fdb0b5c95dbdf10c6f6dd8a4f002fe4f55838857b9ed1346dc6
BLAKE2b-256 checksum
How to use checksums
5018768da79fdd3de8c2c876bef4c63f107698cb004a8d02ba18f286dcebbb8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.8.3 This release

1 release file

0.8.2

1 release file

0.8.1

1 release file

0.8

1 release file

0.7

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page