Steps to create a simple Django project in Python
-Python(>3.8) installed on your machine
I am using PyCharm as my IDE for developing this application. You can use PyCharm or anyother suitable IDE of your choice.
- Open PyCharm and select File -> New Project
- Provide a suitable name. In my case its MyDjangoProject
3. Now Install Django library. For this open the command terminal in PyCharm or on a command prompt and run “pip install DJango==3.1” Once it is done, you should see the below message.
4. Once it is installed, create a new Django project by running the command “django-admin startproject MyDjangoApp .”
Once completed, the IDE will refresh with a directory with name MyDjangoApp with files shown below
5. Now you can run this application with command. This command will run your application and delpoy listening on the port 8000
6. Your first Django application is up and running navigate to the url http://127.0.0.1:8000/ to view a default front page as below. To run the server on a different port use the following command
python manage.py runserver 8080