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
- Host: GitHub
- URL: https://github.com/svetlanam/django-tailwind
- Owner: SvetlanaM
- Created: 2022-04-17T16:19:12.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-12T18:51:01.000Z (about 4 years ago)
- Last Synced: 2026-03-31T06:30:41.353Z (2 months ago)
- Topics: django, example, python3, tailwindcss
- Language: Python
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
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