Skip to main content

Simple switch tag for Django templates.

Project description

A simple “switch” statement for Django templates.


  • Install to PYTHONPATH, etc.

Then either:

  • Add switch_templatetag to settings.INSTALLED_APPS and then use:

    {% load switch_templatetag %}

    … in your templates.


  • Add switch_templatetag.templatetags.switch to your BUILTINS entry in settings.TEMPLATES (Django 1.9)


  • Add to builtins (< Django 1.9) with in some

    from django.template.base import add_to_builtins

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-switch-templatetag, version 2.0.4
Filename, size File type Python version Upload date Hashes
Filename, size django-switch-templatetag-2.0.4.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page