#3371: Filter to get dict's value by key name
---------------------------------------------+------------------------------
          Reporter:  Alex Dedul              |         Owner:  nobody           
       
            Status:  closed                  |     Milestone:                   
       
         Component:  Template system         |       Version:  SVN              
       
        Resolution:  wontfix                 |      Keywords:  template filter 
dict key
             Stage:  Design decision needed  |     Has_patch:  1                
       
        Needs_docs:  0                       |   Needs_tests:  0                
       
Needs_better_patch:  0                       |  
---------------------------------------------+------------------------------
Comment (by slacy):

 Instead of adding a special filter for this case, I think it would make
 sense to amend the template variable processing in general to have an
 extra step:

     * Dictionary lookup. Example: foo["bar"]
     * Attribute lookup. Example: foo.bar
     * Method call. Example: foo.bar()
     * List-index lookup. Example: foo[bar]
     * '''Dictionary/List lookup by reference. Example:
 foo[resolve_variable("bar")]'''

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3371#comment:9>
Django <http://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