Opened 18 years ago
Closed 18 years ago
#4545 closed (fixed)
[unicode] Admin crashed if delete object with unicode-contained primary key
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | other branch |
Severity: | Keywords: | unicode admin | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Subj.
Testcase: create tag 'превед медвед' and try to delete it.
class Tag(models.Model): title = models.CharField(maxlength=255, primary_key='True') class Admin: pass
Traceback:
Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/django/core/handlers/base.py" in get_response 77. response = callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.5/site-packages/django/contrib/admin/views/decorators.py" in _checklogin 55. return view_func(request, *args, **kwargs) File "/usr/lib/python2.5/site-packages/django/views/decorators/cache.py" in _wrapped_view_func 39. response = view_func(request, *args, **kwargs) File "/usr/lib/python2.5/site-packages/django/contrib/admin/views/main.py" in delete_stage 506. deleted_objects = [u'%s: <a href="../../%s/">%s</a>' % (force_unicode(capfirst(opts.verbose_name)), object_id, escape(obj)), []] UnicodeDecodeError at /admin/blog/tag/hello ворлд/delete/ 'ascii' codec can't decode byte 0xd0 in position 6: ordinal not in range(128)
Attachments (1)
Change History (3)
by , 18 years ago
Attachment: | admin-crash-if-delete-unicode-contained-primary-key.diff added |
---|
comment:1 by , 18 years ago
Keywords: | unicode-branch removed |
---|---|
Summary: | Admin crashed if delete object with unicode-contained primary key → [unicode] Admin crashed if delete object with unicode-contained primary key |
Note:
See TracTickets
for help on using tickets.
Fixed title. Removed "unicode-branch" keyword, since that is being used for another purpose.