Django - Basic commands.

Mahesh Jadhav
Aug 13, 2022

--

Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source.

Photo by Hitesh Choudhary on Unsplash

To install Django, adhere to the original documentation.

Creating a new project :

django-admin startproject myproject

Adding app to project :

python3 manage.py startapp appname

Starting Django local web server :

python3 manage.py runserver

Collecting static files :

python3 manage.py collectstatic

Creating migrations :

python3 manage.py makemigrations

Migrating migrations to Database :

python3 manage.py migrate

Creating superuser with admin access :

python3 manage.py createsuperuser

Managing superuser password

python3 manage.py changepassword superusername

Note : Please use python if commands are not working with python3.

--

--

Mahesh Jadhav
Mahesh Jadhav

Written by Mahesh Jadhav

Part time developer, Full time debugger...

No responses yet