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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size django-templates-variables-2020.12.3.tar.gz (1.5 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for django-templates-variables-2020.12.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | aca3c3374c339573e13f2f4c63293cf70c08f92353d18a8ee23e1f35a85d6fb4 |
|
MD5 | 6e888a5ec0cd3a6033ff084a4746ad66 |
|
BLAKE2-256 | 4843301967bac5892be4318a26be00938896d652524ece836ed218853628478c |