Now that we have download django and installed setup properly on our computer. Now we are going to create very first django project. The process of creating django project will be same every time when you create new django project.
Creating django projectGo ahead and navigate anywhere you want to create django project. I am going to create my first django project on default PycharmProject location, you can create your first django project anywhere you want. Follow these steps to create django project.
- Open command prompt using administrator where you want to create your django project
- Type django-admin startproject project_name in command prompt
django-admin startproject MyWebSite
What is django-admin
So this is the tool we got, whenever we download django and installed it. This will allow us to do very cool things during our project phase.
- Open pycharm IDE and click on File>>New Project
- Give a meaning full name for our project and click on Create button
Explore Django Project Directory
What is manage.py in django project
- Never edit this file.
- Never try to delete this filee.
- Just ignore it
The first one is init.py. This file tells that view the child directory MyWebSite as a python package. Actually there is nothing inside this file because we have not code there anything. Again this files tells that treat this directory (MyWebSite) as a python package not a normal directory.
This file is just the setting in configuration option of you website. So it owns overall settings of your entire website.
Python manage.py runserver
Just open above url on your web browser you see below screen right there.
If you see above screen its mean that you have created your very first django website.