Skip to main content

Zero-config Tailwind CSS v4 for Django

Project description

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

Project details


Download files

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

Source Distribution

django_tw-0.1.4.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_tw-0.1.4-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file django_tw-0.1.4.tar.gz.

File metadata

  • Download URL: django_tw-0.1.4.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_tw-0.1.4.tar.gz
Algorithm Hash digest
SHA256 4d34cd3426e56d350af634a505c34ab22d6c5e64a93db30ae720b333a3d59e0a
MD5 196e8998fcec6176059d8f5099c7667a
BLAKE2b-256 932a02349e3c6b5e221dbf473b471fa17d3d4e80392a156b44567a6cd65e2b8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_tw-0.1.4.tar.gz:

Publisher: publish.yml on kujov/django-tw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_tw-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: django_tw-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for django_tw-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6b7523fdf57253f69ae6132e2182cabe4f1ffd209be32b7bfadfd397f7cd12b1
MD5 3332e3d8f5815245abf4d3c4d9844abf
BLAKE2b-256 26ddcf7a5db7fa31ab26bfeb1652e9f5e0f4c50a2e5b14ff8556f0ca8767f6cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_tw-0.1.4-py3-none-any.whl:

Publisher: publish.yml on kujov/django-tw

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page