A modern Django application demonstrating the power of HTMX and Tailwind CSS.
The environment will be automatically configured for you.
Clone the repository:
git clone https://github.com/[your-username]/django-htmx-demo.git
cd django-htmx-demo
Create a virtual environment: ```bash
python -m venv venv venv\Scripts\activate
python3 -m venv venv source venv/bin/activate
3. Install dependencies:
```bash
pip install -r requirements.txt
Set up Tailwind CSS:
python manage.py tailwind install
Create a .env
file:
cp .env.example .env
Run migrations:
python manage.py migrate
Start the development server: ```bash
python manage.py runserver
python manage.py tailwind start
Visit http://localhost:8000 to see the application.
## Development
### VS Code Setup
Install recommended extensions:
- Python
- Django
- Tailwind CSS IntelliSense
### File Structure
django_htmx_demo/ ├── app/ # Main Django project ├── core/ # Main application ├── static/ # Static files ├── templates/ # Template files └── theme/ # Tailwind theme
### Common Commands
```bash
# Create migrations
python manage.py makemigrations
# Apply migrations
python manage.py migrate
# Create superuser
python manage.py createsuperuser
# Run tests
python manage.py test
# Compile Tailwind CSS
python manage.py tailwind build
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)This project is licensed under the MIT License - see the LICENSE file for details.