django_tailwind_cli


Namedjango_tailwind_cli JSON
Version 2.15.0 PyPI version JSON
download
home_pageNone
SummaryDjango and Tailwind integration based on the prebuilt Tailwind CSS CLI.
upload_time2024-09-06 13:05:59
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords django tailwind css
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/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)
![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.8 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

In order to contribute, this package has no required tool dependencies besides an installed version
of Python and pip. But you can use uv to speed up your workflow a bit. The following commands assume
that you have already setup a virtual environment and activated it.

```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 pip

```bash
# Install dependencies
pip3 install -e ".[django-extensions,dev,docs]"

# Run tox testrunner
tox
```

### Without just, but using uv

```bash
# Install dependencies
uv pip install -r pyproject.toml --all-extras -e .

# Run tox testrunner
tox
```

## License

This software is licensed under [MIT license](https://github.com/oliverandrich/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.8",
    "maintainer_email": null,
    "keywords": "django, tailwind, css",
    "author": null,
    "author_email": "Oliver Andrich <oliver@andrich.me>",
    "download_url": "https://files.pythonhosted.org/packages/3b/73/328318c5d40dd50b6af24d8a129a47a36b555834dd70aeca4b5fda5f56da/django_tailwind_cli-2.15.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![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.8 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\nIn order to contribute, this package has no required tool dependencies besides an installed version\nof Python and pip. But you can use uv to speed up your workflow a bit. The following commands assume\nthat you have already setup a virtual environment and activated it.\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 pip\n\n```bash\n# Install dependencies\npip3 install -e \".[django-extensions,dev,docs]\"\n\n# Run tox testrunner\ntox\n```\n\n### Without just, but using uv\n\n```bash\n# Install dependencies\nuv pip install -r pyproject.toml --all-extras -e .\n\n# Run tox testrunner\ntox\n```\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": null,
    "summary": "Django and Tailwind integration based on the prebuilt Tailwind CSS CLI.",
    "version": "2.15.0",
    "project_urls": {
        "Documentation": "https://django-tailwind-cli.andrich.me/",
        "Home": "https://django-tailwind-cli.andrich.me/",
        "Repository": "https://github.com/oliverandrich/django-tailwind-cli"
    },
    "split_keywords": [
        "django",
        " tailwind",
        " css"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e50f1948c31d3d521ba51d879670db5a29ced04af3f8a648a7c348b1603d25a2",
                "md5": "8071396c9506b6ab7d93c87e48edf631",
                "sha256": "16aff06b287d4966e641b0b9b6d053e2301c0dc88f449035f8fe3abcfcc5e573"
            },
            "downloads": -1,
            "filename": "django_tailwind_cli-2.15.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8071396c9506b6ab7d93c87e48edf631",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 10948,
            "upload_time": "2024-09-06T13:05:58",
            "upload_time_iso_8601": "2024-09-06T13:05:58.042174Z",
            "url": "https://files.pythonhosted.org/packages/e5/0f/1948c31d3d521ba51d879670db5a29ced04af3f8a648a7c348b1603d25a2/django_tailwind_cli-2.15.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3b73328318c5d40dd50b6af24d8a129a47a36b555834dd70aeca4b5fda5f56da",
                "md5": "7993227d5db41c4f5e08796531e940e5",
                "sha256": "4c1dd5dda87e81d238261e3caec91a2e1ab1e7eb68ca2dfc8e772f40823d2078"
            },
            "downloads": -1,
            "filename": "django_tailwind_cli-2.15.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7993227d5db41c4f5e08796531e940e5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 26300,
            "upload_time": "2024-09-06T13:05:59",
            "upload_time_iso_8601": "2024-09-06T13:05:59.167515Z",
            "url": "https://files.pythonhosted.org/packages/3b/73/328318c5d40dd50b6af24d8a129a47a36b555834dd70aeca4b5fda5f56da/django_tailwind_cli-2.15.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-06 13:05:59",
    "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"
}
        
Elapsed time: 0.37269s