Skip to main content

django-switch-templatetag

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_templatetag %}

    … 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'

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

Uploaded Source

File details

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

File metadata

File hashes

Hashes for django-switch-templatetag-2.0.4.tar.gz
Algorithm Hash digest
SHA256 bf86daac99369b169399f547efefcb3abd75b704c2f7498384fd1090a1768f80
MD5 04c09c48956d5a3dbff28ff49e66fb31
BLAKE2b-256 47fbae2a943b228704c506f7b716a431cc2a2422c736de6fc9a8942dde819bd3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.4 This release

1 file

2.0.3

1 file

2.0.2

1 file

2.0.1

1 file

2.0.0

1 file

1.0.1

1 file

1.0.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page