Skip to content

Commit

Permalink
Fixed #1818 -- Added better error message for FieldDoesNotExist error…
Browse files Browse the repository at this point in the history
…. Thanks, Christopher Lenz

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2870 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed May 9, 2006
1 parent 4b69ef6 commit ad181e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django/db/models/options.py
Expand Up @@ -94,7 +94,7 @@ def get_field(self, name, many_to_many=True):
for f in to_search:
if f.name == name:
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=''):
"Returns the full 'ORDER BY' clause for this object, according to self.ordering."
Expand Down

0 comments on commit ad181e2

Please sign in to comment.