I'm doing something like:
{% extends 'base.html' %}
{% url myapp.views.dashboard object as object_url %}
{% block sidebar %}
... {{ object_url }} ...
{% endblock %}
{% block content %}
... {{ object_url }} ...
{% endblock %}
Django documentation says url templatetag can define a variable in context, but I don't get any value for object_url
in the following blocks.
If I put the url templatetag at the beginning of each block, it works, but I don't want to "repeat myself".
Anyone knows a better solution?