Html не расширяется правильно, только base.html

При попытке расширения из base.html мой home.html не отображается, когда на url, который показывает home.html, отображается только base.html. Я не могу понять в чем проблема, без расширения мой home.html отображается отлично, но при расширении из base.html кажется, что он не хочет работать

Base.html


  {% load static %}
    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <link rel="stylesheet" href={% static 'css\base.css'%}
    
        
      </head>
      <body>
        <body>
    
        <nav class="navbar">
          <ul class="navbar-nav">
            <li class="nav-item">Home</li>
            <li class="nav-item">About</li>
    
            <!-- Dropdown will go here -->
            
          </nav>
    
    
          {% block body_block %} 
          
          {% endblock %}
        </body>
      </body>
    </html>

Home.html


    {% extends 'base.html' %} {% load static %}

<div class="contianer">
  <div class="heading">NEW RENTALS</div>
  {% for List in listings %}
  <div class="items">
    <img src="{% static List.itempicture %}" alt="" />
    <div class="Info">
      <h1>{{List.title}}</h1>
      <p>{{List.about}}</p>

      <a class="button" href="{{ List.get_absolute_url }}">Contact</a>
    </div>
  </div>
  {% endfor %}
</div>
<link rel="stylesheet" href={% static 'css\home.css'%}

Поместите код home.html между {% block body_block %} и {% endblock body_block %}

поместите блок body в ваш home.html следующим образом...

{% block body_block %}
  <div class="contianer">
    <div class="heading">NEW RENTALS</div>
    {% for List in listings %}
    <div class="items">
      <img src="{% static List.itempicture %}" alt="" />
      <div class="Info">
        <h1>{{List.title}}</h1>
        <p>{{List.about}}</p>

        <a class="button" href="{{ List.get_absolute_url }}">Contact</a>
      </div>
    </div>
    {% endfor %}
  </div>
{% endblock body_block %}
Вернуться на верх