#11710: construct_change_message() with unicode verbose_name fix
-------------------------------------------+--------------------------------
Reporter: Rupe | Owner: nobody
Status: reopened | Milestone:
Component: django.contrib.admin | Version: SVN
Resolution: | Keywords:
construct_change_message exception ascii unicode
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 1
Needs_better_patch: 0 |
-------------------------------------------+--------------------------------
Changes (by kmtracey):
* status: closed => reopened
* resolution: worksforme =>
* needs_tests: 0 => 1
* stage: Unreviewed => Accepted
Comment:
In the non-inline add case we do call force_unicode on the verbose name:
http://code.djangoproject.com/browser/django/tags/releases/1.1/django/contrib/admin/options.py#L599
We should do it also in the places pointed out here. Ramiro, your case
works because you made the verbose name a unicode string. But a utf-8
bytestring would be perfectly valid there as far as Django is concerned,
and that is the case that fails. Note you have to make some change to the
inline objects for an existing parent object in order to trigger the
error....if you just add an inline along with the parent the log message
doesn't say anything about the added inline so the bug isn't triggered.
--
Ticket URL: <http://code.djangoproject.com/ticket/11710#comment:5>
Django <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
-~----------~----~----~----~------~----~------~--~---