Q: How to extends and include in organizing django templates? I have code like this, in my django templates folder:
base.html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    {% block home %} {% endblock home %}
</body>
</html>

top.html
<div id="top">
    <h1>This is the navbar content</h1>
</div>

left.html
<div id="left">
    <p>This is the menu content</p>
</div>

Now i want to include each of these templates into a home template like this
home.html
{% extends "myapp/base.html" %}

{% block home %}
{% include "myapp/top.html" %}
{% include "myapp/left.html" %}
{% endblock home %}

And this is my render function in views.py
views.py
def home(request):
    return render(request, 'myapp/home.html')

But when i run the server the include statement inside of 'home.html' doesn't work. What is going on?
Thanks.

A: enter image description here 
  home.html
  {% extends "base.html" %}

  {% block home %}
  {% include "top.html" %}
  {% include "left.html" %}
  {% endblock home %}
 views.py
  def home(request):
      return render(request, 'home.html')
 urls.py (in your apps)

  from django.urls import path
  from .import views

  urlpatterns = [

  path('', views.home),
  ]

 urls.py (in your main folder)
  from django.contrib import admin
  from django.urls import path, include

 urlpatterns = [
 path('admin/', admin.site.urls),
 path('', include('your app name.urls')),
 ]

It have to work 1000% ,other html file is same
