#8153 closed (duplicate)
UnicodeDecodeError in ModelAdmin (save_add and save_change)
| Reported by: | Nils Fredrik Gjerull | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Keywords: | unicode modeladmin save_add | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
UnicodeDecodeError in save_add and save_change in ModelAdmin
I experienced a UnicodeDecodeError when I added and changed objects through the admin interface. The problem applied to objects having a unicode(self) function returning strings containing non-ASCII characters.
Django trunk revision 8225
Python version: 2.3.4
I attach a patch the admin_views regression test so that it triggers this bug, and a patch that solves the problem.
Attachments (2)
Change History (4)
by , 17 years ago
| Attachment: | modeladmin_options_test.diff added |
|---|
by , 17 years ago
| Attachment: | modeladmin_options.diff added |
|---|
comment:1 by , 17 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
comment:2 by , 17 years ago
Note:
See TracTickets
for help on using tickets.
#8151 was already opened to fix this and make sure there are no more missing force_unicode wrappers in this code, I've added a pointer to this report/patch there.