Answer the question
In order to leave comments, you need to log in
How to compare date with current and execute in jinja template?
Why Unused ''dmy'' at end of if expression.?
{% for date in date_list %}
{% if date.grouper|date:'dmy' == now 'dmy' %}
{% now 'dmy' %}
{% endif %}
{% endfor %}
Answer the question
In order to leave comments, you need to log in
Solved a problem. Passed the ready-made variable now_date = datetime.now() to jinja
{% for date in date_list %}
{% if date.grouper|date:'dmy' == now_date|date:'dmy' %}
{% now 'dmy' %}
{% endif %}
{% endfor %}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question