Monthly Archives

July 2019

Turn your First Project to Hello World!

By | Django

As we seen in last post, the application shows default Django page and not the “Hello World!” string. Isn’t it sad?

In this post we will see how to create a “Hello World!” page inside Django application.

Step1: Create View

Create a new file named inside HelloWorld directory and use this code :


Step2: Set the URL Pattern

Open the file and use this code :


Final Step: Run the server

python runserver 

 To terminate/stop the server, press CTRL+c key

Understanding Directory Structure

By | Django


This is our Django main project directory. It is just a container for our project hence we can rename this directory to anything.

HelloWorld/ is command line utility for interacting with your project.


This is our project directory. It is the actual Python package for your project.


An empty file, which guides Python to treat the directory as a Python module


As the name suggests, this file contains configuration for the project.


This file contains URL pattern of the project.


wsgi is Short for Web Server Gateway Interface. Hence this is the gateway file to wsgi-compatible servers or application. More about WSGI can be read here.