A starter project using Django, Vite and Vue where Vue is used inside Django templates instead of its own application.
This repository was created for my Vite tutorial series.
Introduction to Vite and how you can install it in a Django project. Uses the django-vite package to link Django templates with the Vite static file server.
Demonstrates Vite's Vue plugin and shows you how to set up a Vue app that is rendered in a Django template. Covers how to pass data from a Django view to a Vue component. Uses Single File Components.
- Create a virtual environment
python3 -m venv venv
- Activate your virtual environment
source venv/bin/activate
- Install requirements
pip install -r requirements.txt
- Run migrations
python manage.py migrate
- Start the Django development server
python manage.py runserver
- Start the vite server
npm run vite