Simple switch tag for Django templates.
Project description
A simple “switch” statement for Django templates.
Installation
Install to PYTHONPATH, etc.
Then either:
Add switch_templatetag to settings.INSTALLED_APPS and then use:
{% load switch %}… in your templates.
Or:
Add switch_templatetag.templatetags.switch to your BUILTINS entry in settings.TEMPLATES (Django 1.9)
Or:
Add to builtins (< Django 1.9) with in some models.py:
from django.template.base import add_to_builtins add_to_builtins('switch_templatetag.templatetags.switch'
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
Close
Hashes for django-switch-templatetag-2.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f733b462932a9d220eb3b8d28993636226bcce6f91004b2c5f3984ae4f6e34a |
|
MD5 | 68318b171def69fc6a674e1d4f7f1dd3 |
|
BLAKE2b-256 | 0186a10ff664aeb8f44567ff0ab597713411eac5d0ad5cdf5e6ca7459a8a2c2e |