{{{
{% load cache %}
{% if False %}
{% cache None user.email user.first_name %}
{% endif %}
Here's some content I don't wish to cache when DEBUG is on.
{% if False %}
{% endcache %}
{% endif %}
}}}
The error generated is:
{{{
Invalid block tag on line 28: 'endif', expected 'endcache'. Did you forget
to register or load this tag?
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33370>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
Comment:
Beginning (`{% cache %}`) and ending (`{% endcache %}`) of tags cannot
live in separate `{% if %}` blocks.
If you're having trouble understanding how Django works, see
TicketClosingReasons/UseSupportChannels for ways to get help.
--
Ticket URL: <https://code.djangoproject.com/ticket/33370#comment:1>