Django templates variables settings
Project description
Installation
$ [sudo] pip install django-templates-variables
settings.py
INSTALLED_APPS+= [
'django_templates_variables'
]
TEMPLATES = [
{
# …
'OPTIONS': {
'context_processors': [
'django_templates_variables.context_processors.templates_variables',
],
},
},
]
Examples
settings.py
TEMPLATES_VARIABLES = dict(
settings = dict(
DEBUG=DEBUG,
VAR="VALUE"
)
)
template.html
:
{% if settings.DEBUG %}
{{ settings.VAR }}
{% endif %}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-templates-variables-2020.7.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0298cdeb1da92d7e467c9519c101c4d1d3123992ebc819b76b4582e163c387d0 |
|
MD5 | 6be392a0f07d0c736801f52240873fe6 |
|
BLAKE2b-256 | 0bbb657daa08eb5ce26fe8e74b523b5b436e7c1e3800bc985ecc5111172f80b4 |