Skip to main content

Textblocks

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.

Metadata

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 Provenance Actions
django-textblocks-0.8.3.tar.gz 7.1 kB Without provenance Details for django-textblocks-0.8.3.tar.gz

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

Security for django-textblocks 0.8.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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