mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
[soc2009/admin-ui] The Gaynor commandeth: x.__unicode__() --> unicode(x)
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/admin-ui@11410 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
00c983cfc9
commit
81e8b8bbd5
@ -21,7 +21,7 @@ def foreignkey_autocomplete(request, related_string_functions=None):
|
||||
try:
|
||||
to_string_function = related_string_functions[model_name]
|
||||
except KeyError:
|
||||
to_string_function = lambda x: x.__unicode__()
|
||||
to_string_function = lambda x: unicode(x)
|
||||
if search_fields and app_label and model_name and (query or object_pk):
|
||||
def construct_search(field_name):
|
||||
# use different lookup methods depending on the notation
|
||||
|
Loading…
x
Reference in New Issue
Block a user