Examples


Django - Create Project


Navigate to the directory where you want to create your project

Open a terminal or command activate and navigate to the listing wherein you need to create your Django project.

Create a new Django project

Once you`re inside the directory, run the subsequent command to create a new Django project.

django-admin startproject myproject

Django creates a new myproject folder, with following content.

Project Folder Structure

To Run Django Project

Navigate to the /myproject folder and execute the following command in the command prompt.

python manage.py runserver

After running the command, it will show the following result.

D:\django_projects\myproject>python manage.py runserver
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

You have 18 unapplied migration(s). Your project may not work properly until you 
apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
June 19, 2024 - 14:13:39
Django version 4.2.8, using settings 'ecommerce.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
Browse the URL http://127.0.0.1:8000/

After running the command, it will show the following result.

Django run project page

Prev Next