1
0
mirror of https://github.com/django/django.git synced 2024-12-25 18:46:22 +00:00

Fixed #1818 -- Added better error message for FieldDoesNotExist error. Thanks, Christopher Lenz

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2870 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-05-09 15:29:53 +00:00
parent 4b69ef637a
commit ad181e21c2

View File

@ -94,7 +94,7 @@ class Options:
for f in to_search: for f in to_search:
if f.name == name: if f.name == name:
return f return f
raise FieldDoesNotExist, "name=%s" % name raise FieldDoesNotExist, '%s has no field named %r' % (self.object_name, name)
def get_order_sql(self, table_prefix=''): def get_order_sql(self, table_prefix=''):
"Returns the full 'ORDER BY' clause for this object, according to self.ordering." "Returns the full 'ORDER BY' clause for this object, according to self.ordering."