May 03, 2025
How to create a new Django project?
We can create a Django project by using Django's startproject command. It is one of the most important command to work in Django. We need to use command line utility django-admin following startproject command. Syntax for creating project is mentioned below:
Syntax
django-admin startproject "project name"
Sample Code
django-admin startproject my_school_project
Above command will create a my_school_project name directory with Django project code. To see if Django project created correctly. We can navigate to my_school_project directory and run Django project with below command
Command to run django project
python manage.py runserver
After that open http://127.0.0.1:8000/ url into web browser , it should open an initial Django page.