#23114: Template Variables Docs Incorrect/Unclear
-------------------------------+----------------------
     Reporter:  tom.dalton@…   |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  Documentation  |    Version:  1.6
     Severity:  Normal         |   Keywords:  template
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+----------------------
 On this section
 https://docs.djangoproject.com/en/1.6/topics/templates/#variables
 In the "Behind the Scenes" section, it gives the order that Django tries
 to resolve a variable like "X.Y".
 The 4 things that it tries are accurate, but the way/order they're done
 doesn't appear to be correct.

 Ref the code that does this:
 https://github.com/django/django/blob/master/django/template/base.py#L756

 What actually (seems to) happen is:
 * Try dictionary lookup to get "thing"
 * If not found "thing", try attribute lookup to get "thing"
 * If not found "thing", try list-index lookup to get "thing"
 * If not found "thing", then fail
 * If "thing" is callable, then "thing" = "thing()"
 * Return "thing"

 Applies in version 1.6 and onwards, probably applicable to older doc
 versions too.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/23114>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.796f0423a35516ebd710f71dad29541a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to