How to create "Hello word" app?
Here we will create hello world app, it is a simple app which help to learn basic structure and flow of project. By using this app we go through all files.
Structure of hello word app
Workflow with coding
In this we will do complete coding part step by step.
First open setting.py file which located at HelloWordApp project folder, add app name at last of INSTALLED_APPS part.
INSTALLED_APPS = [
In above code bold part is appname. Now we go to the view.py which exist at project app folder helloworld.
#from django.shortcuts import render
from django.http import HttpResponse
Now go to the urls.py and set urls path.
from django.contrib import admin
from django.urls import path
#from helloworld.views import Index
from helloworld.views import Hello
urlpatterns = [
After this you can run from terminal or cmd by using running command:
>python manage.py runserver
And you will find url like this and open it on browsers and run.
Django version 2.2.1, using settings 'HelloWordApp.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
Not Found: /
Now you find output window after running this url with app name as a path like