You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following URL raises an exception: ?sort=foo. One would expect this would be caught and simply ignored.
Exception Type: TemplateSyntaxError at /projects/usermode/log/
Exception Value: Caught an exception while rendering: Cannot resolve keyword u'foo' into field. Choices are: action_time, action_type, content_type, id, message, object_id, object_name, user
Original Traceback (most recent call last):
File "/home/mits/devel/envs/current/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/template/debug.py", line 71, in render_node
result = node.render(context)
File "/home/mits/devel/envs/current/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/template/defaulttags.py", line 244, in render
if (value and not ifnot) or (ifnot and not value):
File "/home/mits/devel/envs/current/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/db/models/query.py", line 191, in __nonzero__
iter(self).next()
File "/home/mits/devel/envs/current/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/db/models/query.py", line 185, in _result_iter
self._fill_cache()
File "/home/mits/devel/envs/current/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/db/models/query.py", line 618, in _fill_cache
self._result_cache.append(self._iter.next())
File "/home/mits/devel/envs/current/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/db/models/query.py", line 275, in iterator
for row in self.query.results_iter():
File "/home/mits/devel/envs/current/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/db/models/sql/query.py", line 206, in results_iter
for rows in self.execute_sql(MULTI):
File "/home/mits/devel/envs/current/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/db/models/sql/query.py", line 1724, in execute_sql
sql, params = self.as_sql()
File "/home/mits/devel/envs/current/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/db/models/sql/query.py", line 261, in as_sql
ordering = self.get_ordering()
File "/home/mits/devel/envs/current/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/db/models/sql/query.py", line 656, in get_ordering
self.model._meta, default_order=asc):
File "/home/mits/devel/envs/current/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/db/models/sql/query.py", line 684, in find_ordering_name
opts, alias, False)
File "/home/mits/devel/envs/current/lib/python2.5/site-packages/Django-1.0.2_final-py2.5.egg/django/db/models/sql/query.py", line 1321, in setup_joins
"Choices are: %s" % (name, ", ".join(names)))
FieldError: Cannot resolve keyword u'foo' into field. Choices are: action_time, action_type, content_type, id, message, object_id, object_name, user
The text was updated successfully, but these errors were encountered:
… prevents the user from sorting on a field which we have not provided for them as an option. Raising Http404 inside a template tag doesn't work anyway. See directeur#5.
The following URL raises an exception:
?sort=foo
. One would expect this would be caught and simply ignored.The text was updated successfully, but these errors were encountered: