django-tailwind


Namedjango-tailwind JSON
Version 4.4.0 PyPI version JSON
download
home_pageNone
SummaryTailwind CSS Framework for Django projects
upload_time2025-11-05 21:15:53
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords css django tailwind
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Tailwind CSS integration for Django a.k.a. Django + Tailwind = 💚

![Tests](https://github.com/timonweb/django-tailwind/actions/workflows/tests.yml/badge.svg)
[![PyPI](https://img.shields.io/pypi/v/django-tailwind.svg?style=flat-square)](https://pypi.org/project/django-tailwind/)
![GitHub](https://img.shields.io/github/license/timonweb/django-tailwind?style=flat-square)
![Python versions](https://img.shields.io/pypi/pyversions/django-tailwind)
[![Downloads](https://static.pepy.tech/badge/django-tailwind)](https://pepy.tech/project/django-tailwind)
[![Downloads / Month](https://pepy.tech/badge/django-tailwind/month)](<https://pepy.tech/project/django-tailwind>)

![Django Tailwind Demo](https://raw.githubusercontent.com/timonweb/django-tailwind/master/docs/django-tailwind-demo-800.gif)

## 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.js` required);
* 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](docs/index.md) of this
repository.

## Getting Started

1. **Install django-tailwind:**

   a) With all dependencies that make development easier (recommended):
    ```bash
   pip install 'django-tailwind[cookiecutter,honcho,reload]'
   ```

   b) or just the core package (enough for production use):
    ```bash
    pip install django-tailwind
    ```

2. **Add to INSTALLED_APPS in settings.py:**
   ```python
   INSTALLED_APPS = [
       # ...
       "tailwind",
   ]
   ```

3. **Create Tailwind app:**
   ```bash
   python manage.py tailwind init
   ```

4. **Add the generated app to INSTALLED_APPS and configure:**
   ```python
   INSTALLED_APPS = [
       # ...
       "tailwind",
       "theme",  # your generated app name
   ]

   TAILWIND_APP_NAME = "theme"
   ```

5. **Install Tailwind CSS dependencies:**
   ```bash
   python manage.py tailwind install
   ```

6. **Start development (runs Django + Tailwind):**
   ```bash
   python manage.py tailwind dev
   ```

7. **Use Tailwind classes in your templates:**
   ```html
   {% 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](docs/installation.md) instructions.

## Bugs and suggestions

Please see [CONTRIBUTING](CONTRIBUTING.md).

2019 - 2025 (c) Tim Kamanin — [A Full-Stack Django and Wagtail Developer](https://timonweb.com)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-tailwind",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "css, django, tailwind",
    "author": null,
    "author_email": "Tim Kamanin <tim@timonweb.com>",
    "download_url": "https://files.pythonhosted.org/packages/d5/a6/73e5a897ef64d8808cfdf0dab2d9d6bcf0cfe58e3642ff6e657b1bcb6752/django_tailwind-4.4.0.tar.gz",
    "platform": null,
    "description": "# Tailwind CSS integration for Django a.k.a. Django + Tailwind = \ud83d\udc9a\n\n![Tests](https://github.com/timonweb/django-tailwind/actions/workflows/tests.yml/badge.svg)\n[![PyPI](https://img.shields.io/pypi/v/django-tailwind.svg?style=flat-square)](https://pypi.org/project/django-tailwind/)\n![GitHub](https://img.shields.io/github/license/timonweb/django-tailwind?style=flat-square)\n![Python versions](https://img.shields.io/pypi/pyversions/django-tailwind)\n[![Downloads](https://static.pepy.tech/badge/django-tailwind)](https://pepy.tech/project/django-tailwind)\n[![Downloads / Month](https://pepy.tech/badge/django-tailwind/month)](<https://pepy.tech/project/django-tailwind>)\n\n![Django Tailwind Demo](https://raw.githubusercontent.com/timonweb/django-tailwind/master/docs/django-tailwind-demo-800.gif)\n\n## Goal\n\nThis project provides a convenient way to integrate the *Tailwind CSS* framework into a Django project.\nIt creates a new Django app (named theme by default) that includes all the necessary files and configurations to get\nstarted with *Tailwind CSS* quickly and **without even needing to install `Node.js`** if you choose the standalone binary mode.\n\n## Features\n\n* An opinionated *Tailwind CSS* setup that makes your life easier;\n* **Two installation modes:** standalone binary (works without `Node.js`) or npm-based (`Node.js` required);\n* Hot reloading of CSS, configuration files, and *Django* templates. No more manual page refreshes!\n* Out of the box support for CSS imports and nesting;\n* Supports the latest *Tailwind CSS* `v4.x`;\n* Start both *Tailwind CSS* and *Django* development servers with a single command;\n* An optional DaisyUI integration to spice up your Tailwind templates with pre-built components.\n* A convenient management command for installing Tailwind CSS plugins;\n\n## Requirements\n\nPython 3.11 or newer and Django 4.2.20 or newer.\n\n**Note:** `Node.js` is only required if you choose the npm-based installation. The standalone binary mode does not require Node.js.\n\n## Documentation\n\nThe full documentation is at https://django-tailwind.readthedocs.io/ or in the [docs directory](docs/index.md) of this\nrepository.\n\n## Getting Started\n\n1. **Install django-tailwind:**\n\n   a) With all dependencies that make development easier (recommended):\n    ```bash\n   pip install 'django-tailwind[cookiecutter,honcho,reload]'\n   ```\n\n   b) or just the core package (enough for production use):\n    ```bash\n    pip install django-tailwind\n    ```\n\n2. **Add to INSTALLED_APPS in settings.py:**\n   ```python\n   INSTALLED_APPS = [\n       # ...\n       \"tailwind\",\n   ]\n   ```\n\n3. **Create Tailwind app:**\n   ```bash\n   python manage.py tailwind init\n   ```\n\n4. **Add the generated app to INSTALLED_APPS and configure:**\n   ```python\n   INSTALLED_APPS = [\n       # ...\n       \"tailwind\",\n       \"theme\",  # your generated app name\n   ]\n\n   TAILWIND_APP_NAME = \"theme\"\n   ```\n\n5. **Install Tailwind CSS dependencies:**\n   ```bash\n   python manage.py tailwind install\n   ```\n\n6. **Start development (runs Django + Tailwind):**\n   ```bash\n   python manage.py tailwind dev\n   ```\n\n7. **Use Tailwind classes in your templates:**\n   ```html\n   {% load tailwind_tags %}\n   {% tailwind_css %}\n\n   <h1 class=\"text-4xl font-bold text-blue-600\">Hello Tailwind!</h1>\n   ```\n\nThat's it! \ud83c\udf89 Your Django project now has Tailwind CSS installed and ready to use.\n\nFor configuring automatic page reloads during development, see the [Installation](docs/installation.md) instructions.\n\n## Bugs and suggestions\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md).\n\n2019 - 2025 (c) Tim Kamanin \u2014 [A Full-Stack Django and Wagtail Developer](https://timonweb.com)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Tailwind CSS Framework for Django projects",
    "version": "4.4.0",
    "project_urls": {
        "Homepage": "https://github.com/timonweb/django-tailwind"
    },
    "split_keywords": [
        "css",
        " django",
        " tailwind"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f83dede926e6c59bccf454f70cdd9e32959f3b315fc53c95859aa36b410cdf4a",
                "md5": "7cd96bcbed600b5963b25ada94cb8201",
                "sha256": "844c007dacaa0497c0919457e67f92c048a2c89c8b16069b41e507651bd4bfbb"
            },
            "downloads": -1,
            "filename": "django_tailwind-4.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7cd96bcbed600b5963b25ada94cb8201",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 23300,
            "upload_time": "2025-11-05T21:15:51",
            "upload_time_iso_8601": "2025-11-05T21:15:51.462496Z",
            "url": "https://files.pythonhosted.org/packages/f8/3d/ede926e6c59bccf454f70cdd9e32959f3b315fc53c95859aa36b410cdf4a/django_tailwind-4.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d5a673e5a897ef64d8808cfdf0dab2d9d6bcf0cfe58e3642ff6e657b1bcb6752",
                "md5": "c29c5a638d451894a98da4cdde9552e1",
                "sha256": "62fb627f80e5faf464172027200e624dbc7056de4c634fc60a6336ba21e8e0df"
            },
            "downloads": -1,
            "filename": "django_tailwind-4.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c29c5a638d451894a98da4cdde9552e1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 13910,
            "upload_time": "2025-11-05T21:15:53",
            "upload_time_iso_8601": "2025-11-05T21:15:53.268881Z",
            "url": "https://files.pythonhosted.org/packages/d5/a6/73e5a897ef64d8808cfdf0dab2d9d6bcf0cfe58e3642ff6e657b1bcb6752/django_tailwind-4.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-11-05 21:15:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "timonweb",
    "github_project": "django-tailwind",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "django-tailwind"
}
        
Elapsed time: 3.95954s