Answer the question
In order to leave comments, you need to log in
Custom tag inside a condition in a Django template?
Hello
{% load od %}
{% with cod=companyoperationdiagram %}
{% with monday=cod.day1 %}
{% if cod.day1 != 'day off' %}
<p>Время работы:</p>
<p>c {% get_start cod.day1 %}</p><br>
<p>до {% get_end cod.day1 %}</p><br>
<p>обед:</p><br>
<p>до {% get_dinner_start cod.day1 %}</p><br>
<p>до {% get_dinner_end cod.day1 %}</p><br>
{% else %}
<p>Выходной</p>
{% endif %}
{% endwith %}
{% endwith %}
Answer the question
In order to leave comments, you need to log in
Apparently the get_start tag was not loaded. Check if it is in the od template, and also if there are any collisions when loading the template.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question