#3465: template variable list-index lookup on an unsubscriptable object raises
TypeError
------------------------------------------------+---------------------------
Reporter: Gary Wilson <[EMAIL PROTECTED]> | Owner: adrian
Status: new | Component: Template system
Version: SVN | Keywords:
Stage: Unreviewed | Has_patch: 0
------------------------------------------------+---------------------------
For example, if the template variable "`foobar`" with value of None is
passed to a template that uses:
{{{
{{ foobar.13 }}
}}}
The following traceback is produced
{{{
#!python
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/django/template/__init__.py" in
render_node
718. result = node.render(context)
File "/usr/lib/python2.4/site-packages/django/template/__init__.py" in
render
768. output = self.filter_expression.resolve(context)
File "/usr/lib/python2.4/site-packages/django/template/__init__.py" in
resolve
561. obj = resolve_variable(self.var, context)
File "/usr/lib/python2.4/site-packages/django/template/__init__.py" in
resolve_variable
667. current = current[int(bits[0])]
TypeError at /it/
unsubscriptable object
}}}
The expected result would be for `{{ foobar.13 }}` to fail silently.
--
Ticket URL: <http://code.djangoproject.com/ticket/3465>
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
-~----------~----~----~----~------~----~------~--~---