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-2.0.1.tar.gz (3.2 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for django-switch-templatetag-2.0.1.tar.gz
Algorithm Hash digest
SHA256 86050bbfbbc3e0854c93fe61b40236a6fa21020ff7f03d66059dd5a52cb42c89
MD5 a71beafc1ab486a0a22b1bc517471af7
BLAKE2b-256 977bb3888975a62953995ed1072ee776ae9aac6e22875694ebcf6734e675c03d

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