Skip to main content

Provides a very simple tag to load settings variables from Django templates

Project description

Provides a very simple tag to load settings variables from Django templates. If the variable doesn’t exists, an empty string is returned.

https://travis-ci.org/MickaelBergem/django-custom-settings.svg?branch=master https://coveralls.io/repos/github/MickaelBergem/django-custom-settings/badge.svg?branch=master

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 %}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

django_custom_settings_templatetag-1.1.0-py2.py3-none-any.whl (4.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-custom-settings-templatetag-1.1.0.tar.gz.

File metadata

File hashes

Hashes for django-custom-settings-templatetag-1.1.0.tar.gz
Algorithm Hash digest
SHA256 1f8e95a5a9ec878e8d36674a2ac6977aadbe7ba769f7f931cf113d394d221260
MD5 f7c0cffafb60b7bd6a2d3fdaa9569e61
BLAKE2b-256 872829b898dc685172caeeda1940f73751dd36d03507d830ee4a1010c438a9f7

See more details on using hashes here.

File details

Details for the file django_custom_settings_templatetag-1.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_custom_settings_templatetag-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 08fc7215b12a358f0abab653e8fad450444876ea226ee157e0e289a47811f5ba
MD5 a03da77a8599b58d52111bb4aa6b2b4b
BLAKE2b-256 9cc604c511706c3cb7579aea3fb464489f6737fad22ca76ea9a80679be37c1e3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page