Start a New Django Project
Scaffold a Django project and app in a virtual environment, run migrations, and get the dev server running.
beginner10 minmacos · windows · linuxUpdated August 2026
#django#python#web-framework
Requirements
- Python 3 installed. Follow our guide →
Choose your platform
0/3 steps · 0%
01
Create a virtual environment and install Django
bash
$ python3 -m venv venv$ source venv/bin/activate$ pip install djangoNote
Keep Django scoped to a virtual environment per project — it keeps versions from colliding across projects.
02
Create the project and an app
bash
$ django-admin startproject config .$ python manage.py startapp coreconfig holds settings and URL routing; core is your first app — Django projects are made of one or more apps like it.
03
Run migrations and start the server
bash
$ python manage.py migrate$ python manage.py runserverExpected output
Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C.
You're running
Visit http://127.0.0.1:8000/ — the Django welcome page confirms the project is wired up correctly.
Troubleshooting
Django installs its command-line tools into the active virtual environment only — this usually means the venv isn't activated, or `pip install django` ran outside it.
bash
$ which django-adminIf nothing prints, re-activate your virtual environment and reinstall: pip install django.