Python and Django – Basics

Some notes from my Django travels so far…

Virtual Environment

In Windows:

python -m venv .\venv

To generate a requirements.txt file for the specified project:

pip install pipreqs
pipreqs /path/to/project



pip install django

Create project:

django-admin startproject <PROJECT_NAME>

Run server (

python runserver

Start app:

python startapp <APP_NAME>

Make migrations:

python makemigrations


python migrate

Create Super User

python createsuperuser

Leave a Reply

Your email address will not be published. Required fields are marked *