- Ensure UV has the python
uv python install 3.12
- Create the project using the real django-admin from the django package
uvx -p 3.12 --from django django-admin startproject #{project_name}
- Go into the project and add the packages
uv init
to create pyproject.toml
- install
uv add djangorestframework django-environ django-cors-headers
- check that you are in correct virtual environment:
uv run python --version
- add in all the stuff for settings.py, and .env and nonsense... but now you need to create the /API or actual working folder. So you do this:
uv run python manage.py startapp api
or uvx django-admin startapp api
and always run django stuff with uv:
uv run python manage.py migrate