Tailwind CSS Framework for Django projects
Project description
# A Tailwind integration for Django Projects
Early alpha, work in progress...
## Quick start
1. Install the python package django-tailwind from pip
`pip install django-tailwind`
Alternatively, you can download or clone this repo and run `pip install -e .`.
2. Add `tailwind` to INSTALLED_APPS in **settings.py**
3. Create a tailwind-compatible Django-app, I like to call it `theme`:
`python manage.py tailwind init theme`
4. Add your newly created `theme` app to INSTALLED_APPS in **settings.py**
5. In settings.py, register tailwind app by adding the following string:
`TAILWIND_APP_NAME = 'theme'`
6. Run a command to install all necessary dependencies for tailwind css:
`python manage.py tailwind install`
7. Now, go and start tailwind in dev mode:
`python manage.py tailwind start`
8. Add `styles.min.css` to your `base.html` template file:
```html
<link
rel="stylesheet"
href="{% static 'css/styles.min.css' %}"
type="text/css"
/>
```
9. You should now be able to use Tailwind css classes in your html.
10. To build a production version of CSS run:
`python manage.py tailwind build`.
## Bugs and suggestions
If you have found a bug, please use the issue tracker on GitHub.
[https://github.com/timonweb/django-tailwind/issues](https://github.com/timonweb/django-tailwind/issues)
Early alpha, work in progress...
## Quick start
1. Install the python package django-tailwind from pip
`pip install django-tailwind`
Alternatively, you can download or clone this repo and run `pip install -e .`.
2. Add `tailwind` to INSTALLED_APPS in **settings.py**
3. Create a tailwind-compatible Django-app, I like to call it `theme`:
`python manage.py tailwind init theme`
4. Add your newly created `theme` app to INSTALLED_APPS in **settings.py**
5. In settings.py, register tailwind app by adding the following string:
`TAILWIND_APP_NAME = 'theme'`
6. Run a command to install all necessary dependencies for tailwind css:
`python manage.py tailwind install`
7. Now, go and start tailwind in dev mode:
`python manage.py tailwind start`
8. Add `styles.min.css` to your `base.html` template file:
```html
<link
rel="stylesheet"
href="{% static 'css/styles.min.css' %}"
type="text/css"
/>
```
9. You should now be able to use Tailwind css classes in your html.
10. To build a production version of CSS run:
`python manage.py tailwind build`.
## Bugs and suggestions
If you have found a bug, please use the issue tracker on GitHub.
[https://github.com/timonweb/django-tailwind/issues](https://github.com/timonweb/django-tailwind/issues)
Project details
Release history Release notifications | RSS feed
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-0.0.2.tar.gz
(47.1 kB
view details)
File details
Details for the file django-tailwind-0.0.2.tar.gz.
File metadata
- Download URL: django-tailwind-0.0.2.tar.gz
- Upload date:
- Size: 47.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.19.1.post1 CPython/3.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
189dedad4b552a7bdd7733fc3286ccda8881f9cf7faa841e2b00f3b3e09a2729
|
|
| MD5 |
c2a2c528703e6f6a492c80d969ecde25
|
|
| BLAKE2b-256 |
7bfecff2b9da7f442fd756efe7dcee4b6d758c085b3a7a8771a3da1ccd2218cc
|