#3371: Filter to get dict's value by key name
-----------------------+----------------------------------------------------
Reporter: Alex Dedul | Owner: adrian
Status: new | Component: Template system
Version: SVN | Keywords: template filter dict key
Stage: Unreviewed | Has_patch: 1
-----------------------+----------------------------------------------------
Filter's description is in summary. Example usage:
{{{
{{ dict|key:key_name }}
}}}
Filter:
{{{
def key(d, key_name):
return d[key_name]
key = register.filter('key', key)
}}}
Looking that #2741 is closed as wontfix i have a little hope that it could
be added to trunk, but i'll try :).
--
Ticket URL: <http://code.djangoproject.com/ticket/3371>
Django Code <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
-~----------~----~----~----~------~----~------~--~---