To keep your Django project isolated and use a specific Python version (e.g., Python 3.13.3):
uv venv myenv --python 3.13.3
uv venv is an alternative to python -m venv, optimized for speed.
myenv is the name of the virtual environment.
--python 3.13.3 ensures the environment uses Python version 3.13.3 (must be installed on your system).
source myenv/bin/activate
On Windows: myenv\Scripts\activate
This activates the isolated environment so packages don’t pollute your global Python install.
uv pip install django
uv pip is used for fast package installation within the virtual environment.
This installs the latest version of Django.
To verify installation:
django-admin --version
django-admin startproject core
Creates a new project named core with a default structure:
core/
manage.py
core/
__init__.py
settings.py
urls.py
asgi.py
wsgi.py
Change into your project directory:
cd core
Create an app named admin:
python manage.py startapp admin
This creates a new app folder admin containing:
admin/
__init__.py
admin.py
apps.py
migrations/
models.py
tests.py
views.py
📝 Note: Avoid naming your app admin as Django already has an internal module named django.contrib.admin. Use something like customadmin or dashboard to prevent conflicts.
0
1
0