Repolode
timonweb

timonweb/django-tailwind

A Django app that integrates Tailwind CSS into a Django project, with a standalone binary mode that needs no Node.js.

Stars
1,757
Forks
106
Open issues
1
Last commit
10 days ago

What is it?

django-tailwind sets up Tailwind CSS inside a Django project. The `tailwind init` command generates a new Django app (named theme by default) containing the Tailwind configuration and CSS files, and the `tailwind install` and `tailwind dev` commands handle dependencies and development.

There are two installation modes. The standalone binary mode runs without Node.js, while the npm-based mode requires Node.js 22 or newer. Development mode runs the Django and Tailwind servers together with one command and reloads CSS, configuration and templates automatically.

The package requires Python 3.11+ and Django 5.2+, supports Tailwind CSS v4.x, and offers an optional DaisyUI integration and a management command for installing Tailwind plugins.

Key features

  • 01Generates a ready-to-use Tailwind app inside a Django project.
  • 02Standalone binary mode works without Node.js.
  • 03Hot reloading for CSS, Tailwind config and Django templates.
  • 04Starts Django and Tailwind development servers with one command.
  • 05Optional DaisyUI integration for prebuilt components.
  • 06Management command for installing Tailwind plugins.

Use cases

  • Adding Tailwind CSS styling to an existing Django site without a JavaScript build setup.
  • Prototyping Django templates with utility classes and live reload.
  • Building a Django project on a machine where Node.js is unavailable or undesired.

Quick start

  1. 1

    Install django-tailwind with recommended extras

    pip install 'django-tailwind[cookiecutter,honcho,reload]'
  2. 2

    Add "tailwind" to INSTALLED_APPS in settings.py

  3. 3

    Create the Tailwind app

    python manage.py tailwind init
  4. 4

    Install Tailwind CSS dependencies

    python manage.py tailwind install

Things to know

  • Requires Python 3.11 or newer and Django 5.2 or newer.
  • The npm-based installation mode requires Node.js 22 or newer.

Topics

FAQ

What is django-tailwind?
A Django app that integrates Tailwind CSS into a Django project, with a standalone binary mode that needs no Node.js. django-tailwind sets up Tailwind CSS inside a Django project. The `tailwind init` command generates a new Django app (named theme by default) containing the Tailwind configuration and CSS files, and the `tailwind install` and `tailwind dev` commands handle dependencies and development.
Is django-tailwind free to use? What license does it have?
django-tailwind is open source under the MIT license. Check the license terms before using it in commercial products.
Is django-tailwind still maintained?
Actively maintained. The last commit to django-tailwind was on Oct 15, 2026.
What can I use django-tailwind for?
Adding Tailwind CSS styling to an existing Django site without a JavaScript build setup. Prototyping Django templates with utility classes and live reload. Building a Django project on a machine where Node.js is unavailable or undesired.
How do I install django-tailwind?
Install django-tailwind with recommended extras: pip install 'django-tailwind[cookiecutter,honcho,reload]' Add "tailwind" to INSTALLED_APPS in settings.py Create the Tailwind app: python manage.py tailwind init Install Tailwind CSS dependencies: python manage.py tailwind install
Where can I get django-tailwind?
The source code and installation instructions are on GitHub: https://github.com/timonweb/django-tailwind

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects