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-2019.7.31.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16d637a6154b36459585ada72b33bfe6939ad18e11f6c9e6636b30d7463fbefc |
|
MD5 | 0d25da0d8a2caa18186a97e3214428b6 |
|
BLAKE2b-256 | 33d7982d337bf3b2ae22f5da37aaea02a9fe7e45d3623da756a7f9174f4c2def |