title: Django dynamic menu in global view (base.html) to be visible in all templates
body: <p>I have built the website with couple templates but I would like to achieve how to read menu from DB in the base.html that would be visible on entire website, I dont want to add it to every template. I found in the docs by POLL example:</p>
  
  <p><a href="https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#inclusion-tags" rel="nofollow noreferrer">https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#inclusion-tags</a></p>
  
  <p>Screenshots of the error</p>
  
  <p>TemplateSyntaxError at /
  Invalid block tag: 'show_menu'</p>
  
  <p><img src="https://i.stack.imgur.com/gLyhQ.png" alt="Template Syntax Error"></p>
  
  <p><img src="https://i.stack.imgur.com/w4jMR.png" alt="Base.html Error"></p>
  
  <p>Under app I did:
  templatetags/menu.py</p>
  
  <pre><code>from django import template
  register = template.Library()
  
  @register.inclusion_tag('menu.html')
  def show_menu(menu):
      menu = Menu.objects.all()
      return {'menu': menu}
  </code></pre>
  
  <p>base.html</p>
  
  <pre><code>{% load menu %}
  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;&lt;/head&gt;
  &lt;body&gt;
      {% show_menu menu %}
      {% block content %}{% endblock %}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>index.html</p>
  
  <pre><code>{% extends "base.html" %}
  
  {% block content %}
  Hello World! (Content)
  {% endblock %}
  </code></pre>
  
  <p>Please help, what I am doing wrong?
  Thanks</p>