Skip to main content
# 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 %}
```

Example:
```
{% 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
```

Metadata

Release files for django-classnames-tag 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-classnames-tag 0.2
File Size Uploaded
django-classnames-tag-0.2.tar.gz 2.5 kB Details

Release files / django-classnames-tag-0.2.tar.gz

Download URL django-classnames-tag-0.2.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
65943abb940222404a790ab2e186abed05ea57e2745e37c4bf2941476b73aace
BLAKE2b-256 checksum
How to use checksums
e7c2de6c2813915a564fac0a1a68c6f596c76116b191224729789b875e96b905
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file

0.1

1 release file

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