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
File details
Details for the file django-switch-templatetag-1.0.1.tar.gz
.
File metadata
- Download URL: django-switch-templatetag-1.0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f38cf533f819bf11f84cc96612e69bc85edc0a6e08bc0db283476636dbefc3a0 |
|
MD5 | 42e92bc17174b0655a4a83f407f5a188 |
|
BLAKE2b-256 | 9990fd3f8b5a25385bb64281382b66e74312689a9ae5b0ab17de2cd118e89fc2 |