Java, .NET, PHP, PYTHON, ANGULAR, ML, Data Science, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

 Template is used to create a design layer in the Django application, we can create code of HTML under the templates directory.

How to manage template under Django application.

1)  Create Project, Create APP, Create APP Url

2)  Create templates directory(folder) under app then again create directory under templates with appname.

3)  Create Html file under templates/appname

4) Load HTML files using render()

  def  methodname(request):

      return render(request, "appname/htmlfilename")

Now I am implementing Live Example of Templates:-

1)  create app

2)  add app info (appname on and create URL under

3) create app and declare URL for index method of

from django.urls import path

from . import views




4)  Create Method under

from django.shortcuts import render

def index(request):


5)  create templates directory under app and appname subdirectory under templates then create HTML file to design layout.

<!DOCTYPE html>


<h1>Latest Python Interview Session</h1>

 <iframe width="860" height="515" src="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

5) load templates file using render

def index(request):

     return render(request,"employee/welcome.html")


Post a Comment

POST Answer of Questions and ASK to Doubt

Previous Post Next Post