django-extensions/django-extensions — pull request #388 by lociii (2013-10-11 16:59:32+00:00)
Title: admin auto complete: decoding Unicode is not supported

Python version: 2

The admin autocomplete uses the __unicode__ representation of models per default which forces the string in line 112 of the admin/__init__.py to be casted to unicode. This causes the six.u() call to throw unicode decoding errors.
The only way to get a string is to set a related_string_function for the given model.

The patch proposes to check the string for unicode and only cast it if necessary.