This is an edited version of django-tailwind's example (which can be found here)
To run the example project:
Make sure nodejs
and npm
is installed on your device. If you are running on Windows, uncomment NPM_BIN_PATH
in settings.py
(Optional) Create a venv for dependency management
python -m venv env
Windows:
cd env
Scripts\activate.bat
MacOS/Linux:
cd env
source bin/activate
-
Install dependencies via
pip
:pip install -r requirements.txt
-
Install TailwindCSS depencies:
python manage.py tailwind install
-
Start tailwind development server
python manage.py tailwind start
-
Run development server:
python manage.py runserver
-
Open
http://localhost:8000
in a browser. You should see the main page.