Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Django classnames template tag

Project Description

# Django Classnames Tag
Provides a template tag to create css classnames easily.
Inspired by JedWatson/classnames

## Installation
$ pip install django-classnames-tag

Add the app to INSTALLED_APPS:
INSTALLED_APPS += ['django_classnames_tag']

## Usage
{% classnames <classname>=<bool> <classname>=<value>|eq:3 <classname>=<value>|lte:2 %}

{% load classnames %}

<a class="{% classnames success=obj.percentage|gte=90 danger=obj.percentage|lte:10 %}">...</a>

There are a bunch of helper filters available:
lte, lt, eq, gt, gte

Release History

This version
History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(2.5 kB) Copy SHA256 Hash SHA256
Source None Jun 26, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers