Django: How to start a project

How to start a Django project for the first time.

Photo by Scott Graham on Unsplash

Step 1:

Ensure that python has been installed on your computer. The link below will take you through an in-depth step-by-step guide:

Step 2:

Once you have successfully installed python on your computer, you need to create a virtual environment. The link below will take you through an in-depth step-by-step guide on understanding what a virtual environment is and how to create one:

Step 3:

Note: Step 3 is a direct follow-up of the guide that you obtained in step 2

Next, we will create our first Django project and run it and connect it to our local development server.

Step 3.1:

Make sure that you activate your virtual environment as follows:

Step 3.2:

Next, we need to install Django via the pip command:

Step 3.3:

Next, we need to start a new Django project. You can give it any name that you want. In this case, I’m calling it — “myproject1”.

Step 3.4:

Now you need to cd into your Django project.

Step 3.5:

We want to now test our development server, so we must type in the following command:

python manage.py runserver

Step 3.6:

We can navigate to the URL below to see if our server is online:

http://127.0.0.1:8000/

->

A final note…

For those that are interested in learning Django from scratch, feel free to check out my latest course:

Python Django: Ultimate Beginners Course — 2022

Originally published at https://www.cloudwithdjango.com on July 31, 2022.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Arno Pretorius

Arno Pretorius

127 Followers

Hi, I’m Arno… I love cloud computing and django web development and I want to share my knowledge and experiences with you.