[Django]-Django custom assignment_tag does not get executed

7๐Ÿ‘

โœ…

OK, I should have pasted the code as I really have it in my app. I edited the profile.html part above to reflect the actual situation. The issue was that the tags and variables are only executed between {% block foo %} and {% endblock foo %}. So with the following profile.html template it works:

{% extends "website/base.html" %}
{% load getattribute %}
{% block content %}
{% mytag "user.email" as vari %}
{{ vari }}
<p> Rest of the page. </p>
{% endblock content %}
๐Ÿ‘คfrixx

Leave a comment