Skip to content

Latest commit

 

History

History
65 lines (40 loc) · 962 Bytes

File metadata and controls

65 lines (40 loc) · 962 Bytes

django-tailwind

A starter Django project with Tailwind CSS

Setup Django Project

Create a Python virtual environment,

$ python3 -m venv .venv

Activate the virtual environment,

$ source .venv/bin/activate

Install Python packages,

$ pip install -r requirements.txt

Setup Tailwind CSS

Make sure you have node and npm installed on your machine.

Enter

$ cd `django-tailwind`

Install tailwindcss

$ npm install tailwindcss

Init and configure Tailwind CSS,

$ npx tailwindcss init

This would create tailwind.config.js.

Run the following command to distribute Tailwind CSS,

$ npx tailwindcss -i ./static/css/styles.css -o ./static/dist/styles.css --watch

Run Django Development Server

Run the following command to start the development server,

$ python manage.py runserver

Then visit http://127.0.0.1:8000