title: Django is only extending the base.html template in 1 html file
body: <p>I run into an extremely annoying problem that no one has nearly a solution for. I've lost hours on it and unfortunately I can't get it working. This is the problem:</p>
  <p>I am trying to extend a base.html file into 2 different html files. For some reason it is possible to extend it in home.html but not in pakbon.html.</p>
  <p>Below you can see my folder structure (It also doesn't work if I put the files into the same folder):</p>
  <p><a href="https://i.stack.imgur.com/9kuEh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9kuEh.png" alt="Folder structure" /></a></p>
  <p>Below you can see my urls.py:</p>
  <pre><code>urlpatterns = [
  path(&quot;&quot;, views.home, name=&quot;home&quot;),
  path(&quot;pakbon/&quot;, views.pakbon, name=&quot;pakbon&quot;)
  ]
  </code></pre>
  <p>Below you can see my views.py:</p>
  <pre><code>def index(request):
  return render(request, &quot;main/base.html&quot;, {})
  
  @login_required
  def home(request):
      return render(request, &quot;main/home.html&quot;, {})
  
  def pakbon(request):
      return render(request, &quot;pakbonsysteem/pakbon.html&quot;, {})
  </code></pre>
  <p>My base.html:</p>
  <pre><code>&lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
  --- Some HTML
  &lt;/head&gt;
  &lt;body data-background-color=&quot;{{info.mode}}&quot;&gt;
  
  --- Some HTML
  
      {% endfor %}
      {% if user.is_authenticated %}
          {% block content %}
          {% endblock %}
      {% else %}
          &lt;meta http-equiv=&quot;refresh&quot; content=&quot;0; url=/login&quot;&gt;
      {% endif %}
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>My home.html:</p>
  <pre><code>{% extends 'main/base.html' %}
  
  {% block content %}
  
  --- Some HTML
  
  {% endblock %}
  </code></pre>
  <p>My pakbon.html:</p>
  <pre><code>{% extends 'main/base.html' %}
  
  {% block content %}
  
  --- Some HTML code
  
  {% endblock %}
  </code></pre>
  <p>Image from home.html:
  <a href="https://i.stack.imgur.com/oL8Aj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oL8Aj.png" alt="" /></a></p>
  <p>Image from pakbon.html:
  <a href="https://i.stack.imgur.com/7GEC1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7GEC1.png" alt="enter image description here" /></a></p>
  <p>They should both show the same layout, only home.html shows a table and pakbon.html shows a div with some information and javascript, which you see in the image above. However, this doesn't happen.. He just doesn't extend the base.html file in the pakbon.html file. I can also see this because the javascript is not working either. I couldn't figure it out after days of wasting it.. Would be very happy if someone can help me with this.</p>