Tailwind CSS Framework for Django projects
Project description
Tailwind CSS integration for Django a.k.a. Django + Tailwind = 💚
Goal
This project provides a convenient way to integrate the Tailwind CSS framework into a Django project.
It creates a new Django app (named theme by default) that includes all the necessary files and configurations to get
started with Tailwind CSS quickly and without even needing to install Node.js if you choose the standalone binary mode.
Features
- An opinionated Tailwind CSS setup that makes your life easier;
- Two installation modes: standalone binary (works without
Node.js) or npm-based (Node.jsrequired); - Hot reloading of CSS, configuration files, and Django templates. No more manual page refreshes!
- Out of the box support for CSS imports and nesting;
- Supports the latest Tailwind CSS
v4.x; - Start both Tailwind CSS and Django development servers with a single command;
- An optional DaisyUI integration to spice up your Tailwind templates with pre-built components.
- A convenient management command for installing Tailwind CSS plugins;
Requirements
Python 3.11 or newer and Django 4.2.20 or newer.
Note: Node.js is only required if you choose the npm-based installation. The standalone binary mode does not require Node.js.
Documentation
The full documentation is at https://django-tailwind.readthedocs.io/ or in the docs directory of this repository.
Getting Started
-
Install django-tailwind:
a) With all dependencies that make development easier (recommended):
pip install 'django-tailwind[cookiecutter,honcho,reload]'
b) or just the core package (enough for production use):
pip install django-tailwind
-
Add to INSTALLED_APPS in settings.py:
INSTALLED_APPS = [ # ... "tailwind", ]
-
Create Tailwind app:
python manage.py tailwind init
-
Add the generated app to INSTALLED_APPS and configure:
INSTALLED_APPS = [ # ... "tailwind", "theme", # your generated app name ] TAILWIND_APP_NAME = "theme"
-
Install Tailwind CSS dependencies:
python manage.py tailwind install
-
Start development (runs Django + Tailwind):
python manage.py tailwind dev
-
Use Tailwind classes in your templates:
{% load tailwind_tags %} {% tailwind_css %} <h1 class="text-4xl font-bold text-blue-600">Hello Tailwind!</h1>
That's it! 🎉 Your Django project now has Tailwind CSS installed and ready to use.
For configuring automatic page reloads during development, see the Installation instructions.
Bugs and suggestions
Please see CONTRIBUTING.
2019 - 2025 (c) Tim Kamanin — A Full-Stack Django and Wagtail Developer
Star History
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_tailwind-4.4.2.tar.gz.
File metadata
- Download URL: django_tailwind-4.4.2.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3a3eb2d22cbb8c17565898fb68ccedcf806542b04fe4107bdfec7035d582819
|
|
| MD5 |
abbc8ac5b653122c123778c9ad026d70
|
|
| BLAKE2b-256 |
ca2186fda52a8d0f8d2f31d32982ee4d9cc4f29c868dbeb52412e430d083d126
|
Provenance
The following attestation bundles were made for django_tailwind-4.4.2.tar.gz:
Publisher:
ci.yml on timonweb/django-tailwind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_tailwind-4.4.2.tar.gz -
Subject digest:
b3a3eb2d22cbb8c17565898fb68ccedcf806542b04fe4107bdfec7035d582819 - Sigstore transparency entry: 743516969
- Sigstore integration time:
-
Permalink:
timonweb/django-tailwind@dfb5a0004cc06ba9106fa0e15f479dabaa8a0f29 -
Branch / Tag:
refs/tags/4.4.2 - Owner: https://github.com/timonweb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@dfb5a0004cc06ba9106fa0e15f479dabaa8a0f29 -
Trigger Event:
push
-
Statement type:
File details
Details for the file django_tailwind-4.4.2-py3-none-any.whl.
File metadata
- Download URL: django_tailwind-4.4.2-py3-none-any.whl
- Upload date:
- Size: 23.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e4a2836cb36e8952700457d049fadb8743583017cef80fa3a374f8597c289f4
|
|
| MD5 |
aaa80a0dc7f72abb773edca24d3f70d3
|
|
| BLAKE2b-256 |
02ed85113d22ab4268600542152bc4b5512abb1204552b90e04848ebc496aa5c
|
Provenance
The following attestation bundles were made for django_tailwind-4.4.2-py3-none-any.whl:
Publisher:
ci.yml on timonweb/django-tailwind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_tailwind-4.4.2-py3-none-any.whl -
Subject digest:
0e4a2836cb36e8952700457d049fadb8743583017cef80fa3a374f8597c289f4 - Sigstore transparency entry: 743516974
- Sigstore integration time:
-
Permalink:
timonweb/django-tailwind@dfb5a0004cc06ba9106fa0e15f479dabaa8a0f29 -
Branch / Tag:
refs/tags/4.4.2 - Owner: https://github.com/timonweb
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@dfb5a0004cc06ba9106fa0e15f479dabaa8a0f29 -
Trigger Event:
push
-
Statement type: