django-tailwind-cli


Namedjango-tailwind-cli JSON
Version 2.21.1 PyPI version JSON
download
home_pageNone
SummaryDjango and Tailwind integration based on the prebuilt Tailwind CSS CLI.
upload_time2024-12-07 18:48:25
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2022 Oliver Andrich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords css django tailwind
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-tailwind-cli

![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/django-commons/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/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
![GitHub](https://img.shields.io/github/license/django-commons/django-tailwind-cli?style=flat-square)
![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.rtfd.io/latest/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.

- Configuration options 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.
- A management command to install [a workaround to support Tailwind CLI in PyCharm](https://django-tailwind-cli.rtfd.io/latest/usage/#use-with-pycharm).

## Requirements

Python 3.9 or newer with Django >= 4.0.

## Documentation

The documentation can be found at [https://django-tailwind-cli.rtfd.io/](https://django-tailwind-cli.rtfd.io/)

## Contributing

This package requires [uv](https://docs.astral.sh/uv/) for dependency management and tooling. So you have to [install it](https://docs.astral.sh/uv/getting-started/installation/) first. [just](https://github.com/casey/just) is used as a handy command runner to save some typing on the command line. Do yourself a favor and install it too.

```shell
# Setup development environment
just bootstrap

# Upgrade/install all dependencies defined in pyproject.toml
just upgrade

# Run pre-commit rules on all files
just lint

# Run test suite
just test
```

### Without just, but using uv

```bash
# Create venv
uv venv

# Install dependencies
uv sync --all-extras

# Run tox testrunner
uvx --with tox-uv tox
```

## License

This software is licensed under [MIT license](https://github.com/django-commons/django-tailwind-cli/blob/main/LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-tailwind-cli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "css, django, tailwind",
    "author": null,
    "author_email": "Oliver Andrich <oliver@andrich.me>",
    "download_url": "https://files.pythonhosted.org/packages/4b/54/f242a4052aa620920e53fa5351af0b095d98e75d4f921a676fd6a43f35bb/django_tailwind_cli-2.21.1.tar.gz",
    "platform": null,
    "description": "# django-tailwind-cli\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/django-commons/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[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)\n![GitHub](https://img.shields.io/github/license/django-commons/django-tailwind-cli?style=flat-square)\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.rtfd.io/latest/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\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\n- Configuration options 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- A management command to install [a workaround to support Tailwind CLI in PyCharm](https://django-tailwind-cli.rtfd.io/latest/usage/#use-with-pycharm).\n\n## Requirements\n\nPython 3.9 or newer with Django >= 4.0.\n\n## Documentation\n\nThe documentation can be found at [https://django-tailwind-cli.rtfd.io/](https://django-tailwind-cli.rtfd.io/)\n\n## Contributing\n\nThis package requires [uv](https://docs.astral.sh/uv/) for dependency management and tooling. So you have to [install it](https://docs.astral.sh/uv/getting-started/installation/) first. [just](https://github.com/casey/just) is used as a handy command runner to save some typing on the command line. Do yourself a favor and install it too.\n\n```shell\n# Setup development environment\njust bootstrap\n\n# Upgrade/install all dependencies defined in pyproject.toml\njust upgrade\n\n# Run pre-commit rules on all files\njust lint\n\n# Run test suite\njust test\n```\n\n### Without just, but using uv\n\n```bash\n# Create venv\nuv venv\n\n# Install dependencies\nuv sync --all-extras\n\n# Run tox testrunner\nuvx --with tox-uv tox\n```\n\n## License\n\nThis software is licensed under [MIT license](https://github.com/django-commons/django-tailwind-cli/blob/main/LICENSE).\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2022 Oliver Andrich  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Django and Tailwind integration based on the prebuilt Tailwind CSS CLI.",
    "version": "2.21.1",
    "project_urls": {
        "Documentation": "https://django-tailwind-cli.rtfd.io/",
        "Home": "https://django-tailwind-cli.rtfd.io/",
        "Repository": "https://github.com/django-commons/django-tailwind-cli"
    },
    "split_keywords": [
        "css",
        " django",
        " tailwind"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fb503cfd29be03ea1abdc64121aff1e30182b6e9b06524e29661c112652b129a",
                "md5": "d08a21e3cf137240b91c68a073d7d25d",
                "sha256": "5e6df422341844ce3dd76bab3e63bbd74f760e71c3df1005792be23066e78257"
            },
            "downloads": -1,
            "filename": "django_tailwind_cli-2.21.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d08a21e3cf137240b91c68a073d7d25d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 12927,
            "upload_time": "2024-12-07T18:48:23",
            "upload_time_iso_8601": "2024-12-07T18:48:23.558292Z",
            "url": "https://files.pythonhosted.org/packages/fb/50/3cfd29be03ea1abdc64121aff1e30182b6e9b06524e29661c112652b129a/django_tailwind_cli-2.21.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4b54f242a4052aa620920e53fa5351af0b095d98e75d4f921a676fd6a43f35bb",
                "md5": "bc901361c844f2a9e7f4988d65153b10",
                "sha256": "181f69dc172f50914823632dfec6d1d4d52150fcde4358b7439da37da025110b"
            },
            "downloads": -1,
            "filename": "django_tailwind_cli-2.21.1.tar.gz",
            "has_sig": false,
            "md5_digest": "bc901361c844f2a9e7f4988d65153b10",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 66542,
            "upload_time": "2024-12-07T18:48:25",
            "upload_time_iso_8601": "2024-12-07T18:48:25.656055Z",
            "url": "https://files.pythonhosted.org/packages/4b/54/f242a4052aa620920e53fa5351af0b095d98e75d4f921a676fd6a43f35bb/django_tailwind_cli-2.21.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-07 18:48:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "django-commons",
    "github_project": "django-tailwind-cli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "django-tailwind-cli"
}
        
Elapsed time: 0.39081s