Provides a very simple tag to load settings variables from Django templates. If the variable doesn’t exists, an empty string is returned.
Install
To install / update the module:
pip install django-custom-settings-templatetag -U
Usage
In your Django template, do the following :
{% load custom_settings %}
{% settings_value "CUSTOM_VAR_IN_SETTINGS" as CUSTOM_VAR %}
{% if CUSTOM_VAR %}
var={{ CUSTOM_VAR }}
{% endif %}
Metadata
Release files for django-custom-settings-templatetag 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-custom-settings-templatetag-1.1.0.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_custom_settings_templatetag-1.1.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 7.9 kB
Release files / django-custom-settings-templatetag-1.1.0.tar.gz
| Download URL | django-custom-settings-templatetag-1.1.0.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f8e95a5a9ec878e8d36674a2ac6977aadbe7ba769f7f931cf113d394d221260
|
|
BLAKE2b-256 checksum How to use checksums |
872829b898dc685172caeeda1940f73751dd36d03507d830ee4a1010c438a9f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_custom_settings_templatetag-1.1.0-py2.py3-none-any.whl
| Download URL | django_custom_settings_templatetag-1.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
08fc7215b12a358f0abab653e8fad450444876ea226ee157e0e289a47811f5ba
|
|
BLAKE2b-256 checksum How to use checksums |
9cc604c511706c3cb7579aea3fb464489f6737fad22ca76ea9a80679be37c1e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |