Opened 13 years ago

Last modified 13 years ago

#16348 closed Uncategorized

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

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

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

Template A {%include%}'s Template B with a {%with%} block, ie.

{%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 (0)

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