# django-tailwind-cli
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/oliverandrich/django-tailwind-cli/test.yml?style=flat-square)
[![PyPI](https://img.shields.io/pypi/v/django-tailwind-cli.svg?style=flat-square)](https://pypi.org/project/django-tailwind-cli/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)
![GitHub](https://img.shields.io/github/license/oliverandrich/django-tailwind-cli?style=flat-square)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json&style=flat-square)](https://python-poetry.org/)
![Django Versions](https://img.shields.io/pypi/frameworkversions/django/django-tailwind-cli)
![Python Versions](https://img.shields.io/pypi/pyversions/django-tailwind-cli)
[![Downloads](https://static.pepy.tech/badge/django-tailwind-cli)](https://pepy.tech/project/django-tailwind-cli)
[![Downloads / Month](https://pepy.tech/badge/django-tailwind-cli/month)](<https://pepy.tech/project/django-tailwind-cli>)
This library provides an integration of [Tailwind CSS](https://tailwindcss.com) for Django that is using on the precompiled versions of the [Tailwind CSS CLI](https://tailwindcss.com/blog/standalone-cli).
The goal of this library is to provided the simplest possible Tailwind integration for your Django project. It took its inspiration from the [Tailwind integration for Phoenix](https://github.com/phoenixframework/tailwind) which completely skips the neccesity of a node installation.
## Installation
1. Install the library.
```shell
python -m pip install django-tailwind-cli
```
2. Add `django_tailwind_cli` to `INSTALLED_APPS` in `settings.py`.
```python
INSTALLED_APPS = [
# other Django apps
"django_tailwind_cli",
]
```
3. Configure the `STATICFILES_DIRS` parameter in your `settings.py` if not already configured.
```python
STATICFILES_DIRS = [BASE_DIR / "assets"]
```
4. Add template code.
```htmldjango
{% load tailwind_cli %}
...
<head>
...
{% tailwind_css %}
...
</head>
```
5. Start the debug server.
```shell
python manage.py tailwind runserver
```
Enjoy!
Checkout the detailed [installation guide](https://django-tailwind-cli.andrich.me/installation/) if you want to activate browser reload or the `runserver_plus` management command known from `django-extensions`.
## Features
- Simplest possible integration.
- Management commands:
- To start the Tailwind CLI in watch mode during development.
- To build the production grade CSS file for your project.
- To start a debug server along with the Tailwind CLI in watch mode in a single session.
- Necessary configuration to adapt the library to your project, when the defaults don't fit you.
- A template tag to include the Tailwind CSS file in your project.
- A base template for your project.
- A sane tailwind.config.js that activates all the official plugins and includes a simple HTMX plugin.
## Requirements
Python 3.9 or newer with Django >= 3.2.
## Documentation
The documentation can be found at [https://django-tailwind-cli.andrich.me/](https://django-tailwind-cli.andrich.me/)
## Contributing
If you want to contribute to this project, checkout the [development guide](https://django-tailwind-cli.andrich.me/development/) for details to get your dev environment up and running.
## License
This software is licensed under [MIT license](https://github.com/oliverandrich/django-tailwind-cli/blob/main/LICENSE).
Raw data
{
"_id": null,
"home_page": "https://django-tailwind-cli.andrich.me/",
"name": "django-tailwind-cli",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "django, tailwind, css",
"author": "Oliver Andrich",
"author_email": "oliver@andrich.me",
"download_url": "https://files.pythonhosted.org/packages/ad/8b/aa7e16cfb2e0ed873a164849a829e1a1b4bd62f58a3f12b98d5837c6ccaa/django_tailwind_cli-2.11.0.tar.gz",
"platform": null,
"description": "# django-tailwind-cli\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/oliverandrich/django-tailwind-cli/test.yml?style=flat-square)\n[![PyPI](https://img.shields.io/pypi/v/django-tailwind-cli.svg?style=flat-square)](https://pypi.org/project/django-tailwind-cli/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)\n![GitHub](https://img.shields.io/github/license/oliverandrich/django-tailwind-cli?style=flat-square)\n[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json&style=flat-square)](https://python-poetry.org/)\n![Django Versions](https://img.shields.io/pypi/frameworkversions/django/django-tailwind-cli)\n![Python Versions](https://img.shields.io/pypi/pyversions/django-tailwind-cli)\n[![Downloads](https://static.pepy.tech/badge/django-tailwind-cli)](https://pepy.tech/project/django-tailwind-cli)\n[![Downloads / Month](https://pepy.tech/badge/django-tailwind-cli/month)](<https://pepy.tech/project/django-tailwind-cli>)\n\nThis library provides an integration of [Tailwind CSS](https://tailwindcss.com) for Django that is using on the precompiled versions of the [Tailwind CSS CLI](https://tailwindcss.com/blog/standalone-cli).\n\nThe goal of this library is to provided the simplest possible Tailwind integration for your Django project. It took its inspiration from the [Tailwind integration for Phoenix](https://github.com/phoenixframework/tailwind) which completely skips the neccesity of a node installation.\n\n## Installation\n\n1. Install the library.\n\n ```shell\n python -m pip install django-tailwind-cli\n ```\n\n2. Add `django_tailwind_cli` to `INSTALLED_APPS` in `settings.py`.\n\n ```python\n INSTALLED_APPS = [\n # other Django apps\n \"django_tailwind_cli\",\n ]\n ```\n\n3. Configure the `STATICFILES_DIRS` parameter in your `settings.py` if not already configured.\n\n ```python\n STATICFILES_DIRS = [BASE_DIR / \"assets\"]\n ```\n\n4. Add template code.\n\n ```htmldjango\n {% load tailwind_cli %}\n ...\n <head>\n ...\n {% tailwind_css %}\n ...\n </head>\n ```\n\n5. Start the debug server.\n\n ```shell\n python manage.py tailwind runserver\n ```\n\nEnjoy!\n\nCheckout the detailed [installation guide](https://django-tailwind-cli.andrich.me/installation/) if you want to activate browser reload or the `runserver_plus` management command known from `django-extensions`.\n\n## Features\n\n- Simplest possible integration.\n- Management commands:\n - To start the Tailwind CLI in watch mode during development.\n - To build the production grade CSS file for your project.\n - To start a debug server along with the Tailwind CLI in watch mode in a single session.\n- Necessary configuration to adapt the library to your project, when the defaults don't fit you.\n- A template tag to include the Tailwind CSS file in your project.\n- A base template for your project.\n- A sane tailwind.config.js that activates all the official plugins and includes a simple HTMX plugin.\n\n## Requirements\n\nPython 3.9 or newer with Django >= 3.2.\n\n## Documentation\n\nThe documentation can be found at [https://django-tailwind-cli.andrich.me/](https://django-tailwind-cli.andrich.me/)\n\n## Contributing\n\nIf you want to contribute to this project, checkout the [development guide](https://django-tailwind-cli.andrich.me/development/) for details to get your dev environment up and running.\n\n## License\n\nThis software is licensed under [MIT license](https://github.com/oliverandrich/django-tailwind-cli/blob/main/LICENSE).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Django and Tailwind integration based on the prebuilt Tailwind CSS CLI.",
"version": "2.11.0",
"project_urls": {
"Documentation": "https://django-tailwind-cli.andrich.me/",
"Homepage": "https://django-tailwind-cli.andrich.me/",
"Repository": "https://github.com/oliverandrich/django-tailwind-cli"
},
"split_keywords": [
"django",
" tailwind",
" css"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "671cb416f5b0e40c352177e8c33d120e8aefabf5eb644a171913505b5ad50cdc",
"md5": "e3e3f6ed6752591f08c700c1a23584da",
"sha256": "cf845b0b9fadd1225960f272b78cb8f06fd704462884bd0a5405e11a7b464979"
},
"downloads": -1,
"filename": "django_tailwind_cli-2.11.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e3e3f6ed6752591f08c700c1a23584da",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 10611,
"upload_time": "2024-04-21T14:12:20",
"upload_time_iso_8601": "2024-04-21T14:12:20.755130Z",
"url": "https://files.pythonhosted.org/packages/67/1c/b416f5b0e40c352177e8c33d120e8aefabf5eb644a171913505b5ad50cdc/django_tailwind_cli-2.11.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ad8baa7e16cfb2e0ed873a164849a829e1a1b4bd62f58a3f12b98d5837c6ccaa",
"md5": "681ab7baee5fcf895ad4dbf4e2c276fa",
"sha256": "9612a7b32986ab3153239c88666370a0443fcc1ef1fe31761a827df0b79d46f0"
},
"downloads": -1,
"filename": "django_tailwind_cli-2.11.0.tar.gz",
"has_sig": false,
"md5_digest": "681ab7baee5fcf895ad4dbf4e2c276fa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 10126,
"upload_time": "2024-04-21T14:12:22",
"upload_time_iso_8601": "2024-04-21T14:12:22.697374Z",
"url": "https://files.pythonhosted.org/packages/ad/8b/aa7e16cfb2e0ed873a164849a829e1a1b4bd62f58a3f12b98d5837c6ccaa/django_tailwind_cli-2.11.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-21 14:12:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "oliverandrich",
"github_project": "django-tailwind-cli",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "django-tailwind-cli"
}