Made FieldError/FieldDoesNotExist messages uniform across Python versions.

Removed possible u'' prefixes on Python 2.
This commit is contained in:
François Freitag 2016-09-17 06:29:14 -07:00 committed by Tim Graham
parent 9027e6c8a3
commit 631ef6b272
5 changed files with 9 additions and 11 deletions

View file

@ -1339,7 +1339,7 @@ class Query(object):
if pos == -1 or fail_on_missing:
field_names = list(get_field_names_from_opts(opts))
available = sorted(field_names + list(self.annotation_select))
raise FieldError("Cannot resolve keyword %r into field. "
raise FieldError("Cannot resolve keyword '%s' into field. "
"Choices are: %s" % (name, ", ".join(available)))
break
# Check if we need any joins for concrete inheritance cases (the