#16348: {%with%} variable values not available in {%include%}'ed templates
-----------------------------------------+------------------------------
               Reporter:  leim@…         |          Owner:  nobody
                   Type:  Uncategorized  |         Status:  closed
              Milestone:                 |      Component:  Core (Other)
                Version:  1.2            |       Severity:  Normal
             Resolution:  invalid        |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------------
Changes (by aaugustin):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 You don't appear to be describing a bug in Django — or if you are, I
 really can't figure out what it is. For general support with Django, you
 should join #django on !FreeNode or write to the django-users mailing
 list.

 ----

 > Any direct references to 'a' in template_b works just fine, including
 working with filters.
 OK.

 >However, a does not appear to be included in the Request object's GET or
 POST.
 What `Request` object? How is this related to the previous and next
 sentences?

 > This means that, for example, any custom context processors attached to
 Template A does not see the variable a.
 Well, context processors process the context ''before'' the template is
 rendered. Obviously, `a` doesn't exist at this time. The template in
 general, and `with` tags in particular, can't be processed before all the
 context processors have run. For instance, a context processor can add
 `spam` to the context, and you can use `{% with spam.eggs as omelette %}`
 in the template.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16348#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to