Skip to main content

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

django-switch-templatetag-1.0.1.tar.gz (3.2 kB view details)

Uploaded Source

File details

Details for the file django-switch-templatetag-1.0.1.tar.gz.

File metadata

File hashes

Hashes for django-switch-templatetag-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f38cf533f819bf11f84cc96612e69bc85edc0a6e08bc0db283476636dbefc3a0
MD5 42e92bc17174b0655a4a83f407f5a188
BLAKE2b-256 9990fd3f8b5a25385bb64281382b66e74312689a9ae5b0ab17de2cd118e89fc2

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