#4921: django.contrib.admin calls str() on model instances, not unicode()
---------------------------------------------------------+------------------
Reporter: Ludvig Ericson <[EMAIL PROTECTED]> | Owner:
adrian
Status: new |
Component: Admin interface
Version: SVN |
Resolution:
Keywords: admin unicode listing |
Stage: Unreviewed
Has_patch: 0 |
Needs_docs: 0
Needs_tests: 0 |
Needs_better_patch: 0
---------------------------------------------------------+------------------
Changes (by mtredinnick):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
I'm not sure what the bug is here.
Models have a default {{{__str__}}} method that calls the
{{{__unicode__}}} method, if it exists, and encodes the output correctly
(something your temporary fix does not do -- it will break if the result
of {{{__unicode__}}} is non-ASCII). So there shouldn't be any problem at
all here.
Are you seeing an actual error? If so, what are the steps to replicate it?
Calling str() on a model instance should be quite safe and shouldn be
behaving correctly and predictably. We test this in the test suite
already.
--
Ticket URL: <http://code.djangoproject.com/ticket/4921#comment:1>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---