This is a Django project template that includes Tailwind CSS for styling and hot CSS reloading. It's a great starting point for web development projects that require a modern and responsive user interface.
- Django: A high-level Python web framework.
- Tailwind CSS: A utility-first CSS framework for quickly building custom designs.
- Hot CSS Reloading: Automatically refreshes the CSS without the need to manually reload the page.
Before you begin, ensure you have met the following requirements:
- Python 3.x
- pip
- npm
-
Clone this repository:
cookiecutter https://github.com/usefuulness/django_tailwind.git cd your-project
(or run the build.sh script)
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On macOS and Linux:
source venv/bin/activate
-
-
Install Python dependencies:
pip install -r requirements.txt
-
Install JavaScript dependencies:
npm install
-
Run the development server:
python manage.py runserver
-
Open your web browser and navigate to
http://localhost:8000/
to see the project in action.
This project includes a script (reload_css.sh
) for hot reloading CSS during development. To use it, follow these steps:
-
Open a terminal and navigate to the project directory.
-
Run the
reload_css.sh
script:./reload_css.sh
-
Start making changes to your CSS files (usually found in the
static/css/
directory). -
The CSS changes will be automatically applied without the need to manually reload the page.
- Customize the Django application as needed.
- Modify the Tailwind CSS styles in the
static/css/
directory. - Add your templates and views.
To deploy this project to a production server, please follow best practices for securing your Django application, including using a production-ready database and web server.
If you'd like to contribute to this project, please fork the repository and create a pull request. We welcome contributions!
This project is licensed under the MIT License - see the LICENSE file for details.
- This project was created with Cookiecutter.