How to Start a Project in Django 


               


How to Start a Project in Django



Python


In this article, we show how to start a project in Django.

By a project, what is meant is really a website.

When we create a project in Django, we're really building a website. This is the starting point of creating a website based on the Django framework.

So, the first step to creating a website in Django is to create a project.

So, in order to create a project in Django, you first have to install Django. To see a guide on how to install Django (on a windows PC), see How to Install Django on a Windows PC.

So, once Django is installed, which you will install in the Scripts folder of the Python package, the next step is to open up your command prompt and specify the full path to the Scripts folder.

Once you have done this, type the following command into the command prompt.



The following code above creates a project called mywebsite.

In the command prompt, this would be shown as the following.

Django startproject

So, once this goes through and you receive no error message, the project, mywebsite, has been created.

Again, this is the first step to creating a website in the Django framework.

Later, we will show how to create apps, which are pages for your website. However, websites based on the Django framework, first needs a project. Once this is created, we can get to other dimensions of the website.


Related Resources

How to Show All Tables of a MySQL Database in Python

How to Count the Number of Rows in a MySQL Table in Python



HTML Comment Box is loading comments...