Skip to main content

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

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)

Source distribution for django-custom-settings-templatetag 1.1.0
File Size Uploaded
django-custom-settings-templatetag-1.1.0.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-custom-settings-templatetag 1.1.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page