Django Starter 1 — Create Project

Rubaiyat Rahim
2 min readMay 20, 2024

--

Creating a basic Django project.

Other parts of this series: Part 2 | Part 3 | Part 4 | Part 5 | Part 6

Prepare the Environment

# Create the project root folder.
mkdir projectroot

# Open the folder in VS Code.
code .

# Open new terminal in VS Code.

# Create a new virtual environment and activate.
py -m venv env
.\env\Scripts\activate

# In VS Code IDE, go to
# View
# → Command Palette
# → Python: Select Interpreter
# → Select the python in the virtual environment just created.

# Check version of python and pip, upgrade pip.
py --version
py -m pip install --upgrade pip
pip --version

# Install Django and check version.
py -m pip install django
django-admin --version

Create the Project

# Create the Django project.
django-admin startproject myproject

Test the Project

File system contents in the project root folder.
# Navigate to the project folder and run the project.
cd myproject
py manage.py runserver

# Project creation succeeded
# if the following is shown at http://127.0.0.1:8000/

--

--