Hello, I need help.
Trying to use the Django template engine. Inheritance does not work.

  1. Created a project;
  2. Created the News app;
  3. Wrote the #News views.py function

     from django.shortcuts import render def newsHome(request): return render(request, 'main/base.html') 
  4. In the very base.html made markup and pointed tags

     {% block title%}{% endblock %} 
  5. Next home.html file

     {% extends 'main/base.html'%} {% block title%}TEXT!!1{% endblock %} 

However, no inheritance occurs. The page is displayed. But there is no text block. Why does not it work? Python 3.6.4; Django 2.0.2

  • one
    Well, your views.py doesn’t use home.html, and that’s not working - andreymal
  • one
    return render(request, 'main/home.html') - andreymal
  • Earned, THANK YOU! - AlTheOne

0