Creating Your First Django Project

Welcome to your first Django tutorial. This will cover the initial setup of Django and the creation of your first project with the framework. Let’s get started.

Step 1: Download Python if you haven’t already. You can download Python at here:

https://www.python.org/downloads/

*Please download Python 3.5+ to follow along with this series of tutorials…

Step 2: Once you download Python, you will have its default package manager (Pip) installed also. Open up your command prompt (if on Windows) and type in the following command: py -m pip install django

Step 3: Create a folder in a directory where you want your Django project to be stored. Change your directory in the command prompt to the folder you just created. You can also right click in the folder while holding shift to open up a command prompt window there.

Step 4: Type in the following command: django-admin startproject mysite

You should notice a folder created in the application directory.

Step 5: Change your directory to the mysite folder within your app directory and run the following command: python manage.py runserver

Once you see this, go to your browser and type in the following URL: http://127.0.0.1:8000/

You should see this window indicating you’ve created your first website hosted on your local machine:

 

 

About the author

programmingforfinance

Hi, I'm Frank. I have a passion for coding and extend it primarily within the realm of Finance.

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *