So right now I hardcode to url, which is a bit annoying if you move endpoints. This is my current setup for my navbar items.
# in base.html
{% include 'components/navbar/nav-item.html' with title='Event Manager' url='/eventmanager/' %}
# in components/navbar/nav-item.html
<li>
<a href="{{ url }}">{{ title }}</a>
</li>
See how I use the url right now?
What I now want is this:
{% include 'components/navbar/link.html' with title='Event Manager' url={% url 'event_manager:index' %} %}
But apparently, this is invalid syntax. How do I do it?
If it is not possible, how do I create an app that somehow creates a view where I can pass all the URLs with context variable? In theory, this sounds easy but I'd have to somehow insert that view in every other view.