How to create a new Django Project

Post Reply
programmer
Posts: 10
Joined: 27 Mar 2019

How to create a new Django Project

Post by programmer » 20 Oct 2019

Hello all, I am a beginner to Django and I had gone through the below link to start with Django

Django Overview

But i am unable to understand which command is used to create a new django project.

Please could you explain about this?

With Regards
programmer

User avatar
Aisangam
Site Admin
Posts: 28
Joined: 24 Mar 2019
Location: Delhi, India
Contact:

Re: How to create a new Django Project

Post by Aisangam » 20 Oct 2019

Thanks for asking this question. Sorry we had forgotten to mention this in the tutorial Learn Django Overview. Let us describe here below

To create Django project please have django installed. If you donot have, donot worry first install and create virtual environment and then activate it. To install virtual environment you can type the below command

Code: Select all

sudo apt-get install virtualenv
To create virtual environment using python3 please do execute the below command

Code: Select all

virtualenv --python python3 *name_of_env*
Now, it is time to activate virtualenv, this can be done using the below command

Code: Select all

source name_of_env/bin/activate
Now install django using pip

Code: Select all

pip install django
Since Django is installed, it is the time to create project using django. Let us execute the below command

Code: Select all

django-admin startproject **name_of_project**
Go inside the project and execute the below command

Code: Select all

python manage.py startapp **name_of_app**
I hope in this way you will able to create a new django project with ease.

With Regards
AI Sangam

Post Reply