Textblocks
Installation
Add textblocks and optionally modeltranslation to INSTALLED_APPS
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).
Run ./manage.py makemigrations textblocks and ./manage.py migrate
Usage
Load templatetags {% load textblock_tags %}
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)
| 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.