Opened 13 years ago

Last modified 13 years ago

#16348 closed Uncategorized

{%with%} variable values not available in {%include%}'ed templates — at Version 1

Reported by: leim@… Owned by: nobody
Component: Core (Other) Version: 1.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Aymeric Augustin)

I have the following scenario. (Django version: 1.2.3).

Template A {% include %}s Template B with a {% with %} block:

{% with 'aaa' as a %}
 {% include "template_b' %}
{% endwith %}

Any direct references to 'a' in template_b works just fine, including working with filters. However, a does not appear to be included in the Request object's GET or POST. This means that, for example, any custom context processors attached to Template A does not see the variable a.

Is this expected behaviour? or I am missing some thing here?

Thanks,
Lei

Change History (1)

comment:1 by Aymeric Augustin, 13 years ago

Description: modified (diff)

Fixed formatting (please check the preview before submitting a bug).

Note: See TracTickets for help on using tickets.
Back to Top