Skip to main content

Django and Tailwind integration based on the prebuilt Tailwind CSS CLI.

Project description

django-tailwind-cli

GitHub Workflow Status PyPI Code style: black GitHub poetry-managed

This project provides an integration of Tailwind CSS for Django that is based on the precompiled versions of the Tailwind CSS CLI.

It is inspired by the implementation of the Tailwind integration for Phoenix which completely skips the neccesity of a node installation. So it is a perfect match, if you are a user of htmx or any other framework that tries to avoid JavaScript coding in your web app. My personal motivation was, that I discovered that I never needed any other plugin besides the official plugins, which are already included in the CLI.

If you want to use node or you have to use it because of other dependencies, then the package django-tailwind by Tim Kamamin might be a better solution for you.

Features

  • Management Commands...
    • ...to install the the CLI for your operating system and machine architecture.
    • ...to start the CLI in watch mode to incrementally compile your style sheet.
    • ...to create a theme app which includes a basic stylesheet and a tailwind configuration which you can extend.
    • ...to build the production ready CSS file.
  • A template tag to include the CSS file in your base template.
  • All the official plugins (typography, form, line-clamp, container queries, and aspect-ratio) integrated in the CLI are activated in the default configuration.

Requirements

Python 3.8 or newer with Django >= 3.2.

Documentation

The documentation can be found at https://oliverandrich.github.io/django-tailwind-cli/.

Installation

python -m pip install django-tailwind-cli

Check the docs for detailed installation instructions.

Bugs and suggestions

In case you have found a bug or have a suggestion, please open a ticket at https://github.com/oliverandrich/django-tailwind-cli/issues.

License

This software is licensed under MIT license. Copyright (c) 2022 Oliver Andrich.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_tailwind_cli-1.4.3.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

django_tailwind_cli-1.4.3-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file django_tailwind_cli-1.4.3.tar.gz.

File metadata

  • Download URL: django_tailwind_cli-1.4.3.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.2 Linux/5.15.0-1035-azure

File hashes

Hashes for django_tailwind_cli-1.4.3.tar.gz
Algorithm Hash digest
SHA256 a41ef383db198971c14e5d451b981503de3600c9a393a46269f6a36ebb140bbc
MD5 fb96d3c05b632583f4ae853fb3b03a0a
BLAKE2b-256 83eb0ad6b57e120c076436464c2c783b42a494f284d1c06632b5fb4e4daedf1a

See more details on using hashes here.

File details

Details for the file django_tailwind_cli-1.4.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_tailwind_cli-1.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f09355aaf34ed3a1166522178bbe4427364bad18cc9e9e800a453f3166fb1785
MD5 ecb0e96909dbc0a3123a1d42b961d2fb
BLAKE2b-256 2eec088c8ee5e34f29c67398ced6d0ed7e2430907487c466c27db100ab9eefda

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page