Simple Django Project

Steps to create a simple Django project in Python

Git Url – https://github.com/letsblogcontent/MyDjangoProject

Prerequisites –
-Python(>3.8) installed on your machine
-PyCharm(Optional)

I am using PyCharm as my IDE for developing this application. You can use PyCharm or anyother suitable IDE of your choice.

Steps

  1. Open PyCharm and select File -> New Project
  2. 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

One thought on “Simple Django Project”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: