An open API service indexing awesome lists of open source software.

https://github.com/svetlanam/django-tailwind

This is example how to setup Django with Tailwind CSS framework
https://github.com/svetlanam/django-tailwind

django example python3 tailwindcss

Last synced: 28 days ago
JSON representation

This is example how to setup Django with Tailwind CSS framework

Awesome Lists containing this project

README

          

# Django + Tailwind

This is example how to setup [Django](https://www.djangoproject.com/) with
[Tailwind CSS framework](https://tailwindcss.com/).

### Requirements

1. Python 3.4 or higher
2. Node.js
3. [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/) - package
managers
4. [pip](https://pypi.python.org/pypi/pip/1.0.2) - tool for installing and
managing Python packages
5. [virtualenv](http://docs.python-guide.org/en/latest/dev/virtualenvs/) - tool
to keep the dependencies required by different projects in separate places

### Installation

These commands are valid for **Mac/Ubuntu OS**. If you develop on Windows, you
should replace them with proper commands, If you are using the default Windows
Command Line.

1. Create virtual environment in your project folder python3 -m venv
venv

2. Activate the virtual environment source venv/bin/activate
3. Install required libraries and packages pip3 install -r
requirements.txt

4. Navigate to the project root
5. Install Tailwind python3 manage.py tailwind install
6. Setup path to your npm installation which npm (or yarn)
7. Setup ENV variable in project/settings.py

NPM_BIN_PATH={your path}
8. Install Tailwind dependencies python3 manage.py tailwind install
9. Migrate database python3 manage.py migrate
10. Run server python3 manage.py runserver in one terminal
11. Run Tailwind python3 manage.py tailwind start in another
terminal