title: How do I add a dynamic base template in django?
body: <p>Suppose I have a base.html template. In the base.html template contains the menu bar, the fixed footer and the content block.
  Exemple:</p>
  
  <p><strong>base.html</strong></p>
  
  <pre><code>&lt;nav class="navbar navbar-expand-lg navbar-dark bg-dark"&gt;
      &lt;a class="navbar-brand mr-0 mr-md-2" href="/"&gt;
              &lt;img src="{{ url of an image added in the database that can be changed by the user }}" height="60" class="d-inline-block" alt="site"&gt;Site&lt;/a&gt;
          &lt;button class="btn btn-link bd-search-docs-toggle d-md-none p-0 ml-3" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"&gt;
          &lt;span class="navbar-toggler-icon"&gt;&lt;/span&gt;
      &lt;/button&gt;
      &lt;div class="collapse navbar-collapse" id="navbarNav"&gt;
      &lt;ul class="navbar-nav"&gt;
      &lt;li class="nav-item"&gt;
          &lt;a class="nav-link" href="#"&gt;Diário Oficial do PL&lt;/a&gt;
      &lt;/li&gt;
      &lt;li class="nav-item"&gt;
          &lt;a class="nav-link" href="#"&gt;Site Oficial do PL&lt;/a&gt;
      &lt;/li&gt;
      &lt;li&gt;
          &lt;a class="nav-link" href="#"&gt;Links Úteis&lt;/a&gt;
      &lt;/li&gt;
      &lt;/ul&gt;
      &lt;/div&gt;
  &lt;div class="container" style="min-height: calc(100vh - 230px);"&gt;
  {% block content %}
  &lt;!-- Blocl content --&gt;
  {% endblock %}
  &lt;/div&gt;
  {% block footer %}
  {% endblock %}
  </code></pre>
  
  <p><strong>home.html</strong></p>
  
  <pre><code>{% extends 'base/base.html' %}
  {% load static %}
  {% block conteudo %}
  &lt;p&gt;Content bla bla bla bla bla &lt;/p&gt;
  {% endblock %}
  </code></pre>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>class Orgao(models.Model):
      name = models.CharField(max_length=80)
      logo = models.ImageField()
  </code></pre>
  
  <p>How would a view that would take this image in the database and show in the base.html that is extended to all the pages of the system?</p>