title: django - how to display list objects from model in 'base.html' and extends it to all other templates
body: <p>I have a navbar in "base.html" and i want to list objects from model on it,
  so this list be visible on all other template that extends 'base.html'</p>
  
  <p>'base.html'</p>
  
  <pre><code>&lt;nav&gt;
     {% for category in categories %}
        &lt;a href="#"&gt;{{ category.category_name }}&lt;/a&gt;
     {% endfor %}
  &lt;/nav&gt;
  </code></pre>
  
  <p>models.py</p>
  
  <pre><code>class Categories(models.Model):
     category_name           = models.CharField(max_length=100, null=True)
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>class NavbarView(ListView):
     model               = Categories
     template_name       = 'base.html'
     context_object_name = 'categories'
  </code></pre>
  
  <p>urls.py</p>
  
  <pre><code>path('nav/', views.NavbarView.as_view(), name='nav')
  </code></pre>
  
  <p>this makes categories list visible only on 'nav/' urls but not in all templates that extends 'base.html</p>
  
  <p>how can i do this ? thanks</p>