Skip to main content

django-tw

Zero-config Tailwind CSS v4 for Django. Auto-downloads the standalone CLI, discovers your templates, and watches for changes when you run runserver.

No Node.js. No config files. No build step to remember.

Setup

pip install django-tw

Add it to the top of INSTALLED_APPS:

INSTALLED_APPS = [
    "django_wind",
    # ...
]

Add the template tag to your base template:

{% load wind %}
{% wind_css %}

Usage

Start your dev server as usual:

python manage.py runserver

Tailwind starts automatically in watch mode. Edit your templates, the CSS rebuilds.

For production:

python manage.py tailwind build

How it works

  1. Downloads the Tailwind v4 standalone CLI on first run (cached at ~/.django-wind/bin/)
  2. Scans TEMPLATES and INSTALLED_APPS to find all template directories
  3. Generates an input CSS file with @source directives pointing to your templates
  4. Outputs to static/css/wind.css

Settings

All optional. Add a WIND dict to your Django settings:

WIND = {
    "OUTPUT_CSS": "css/wind.css",       # path relative to STATICFILES_DIRS[0]
    "CLI_VERSION": "v4.2.2",            # pin a version (default: "latest")
    "CLI_PATH": "/usr/local/bin/tw",    # use a pre-installed binary
    "EXTRA_SOURCES": [                  # additional source globs
        "/path/to/extra/templates/**/*.html",
    ],
}

License

MIT

Release files for django-tw 0.1.6

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-tw 0.1.6
File Size Uploaded
django_tw-0.1.6.tar.gz 6.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-tw 0.1.6
File Interpreter ABI Platform
django_tw-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size:14.4 kB

Release files / django_tw-0.1.6.tar.gz

Download URL django_tw-0.1.6.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
79200c6d7ebcdbfde981c236a240888a16ebcdb5e5e5857f925b9ba1fb2bffb1
BLAKE2b-256 checksum
How to use checksums
0c039a0dac4fe3d88076a752dba28bb5a3187c562db6ef66c68425a438e0f3f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.

Transparency log

Release files / django_tw-0.1.6-py3-none-any.whl

Download URL django_tw-0.1.6-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2272679aa0cc3463fa869231319090117a9e69717bbaf3b893fbbd017819ee60
BLAKE2b-256 checksum
How to use checksums
fe98a31c6079f88a1ac59a723910c510db7d7f9417c1fa6efef47cc9ed5d1d28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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