Articles → DJANGO → Render Our View From HTML Template In Django

Render Our View From HTML Template In Django


  1. Create a HTML template.
  2. Set the template path in
  3. Change in home function in TestModule.

Create A HTML Template

      <h1>This is the first heading</h1>
      <h2>This is the second heading</h2>

Set The Template Path In Settings.Py

Picture showing the template path added in
Click to Enlarge

Change In Home Function In Testmodule.

def home(request):
    return render(request, 'FirstTemplate.html', {})


Picture showing the output of rendering the view from HTML template in django
Click to Enlarge

Posted By  -  Karan Gupta
Posted On  -  Tuesday, June 11, 2019


Your Email Id  
Query/FeedbackCharacters remaining 250