Opened 16 years ago

Last modified 16 years ago

#6833 closed

Leaving the u off a string returned from __unicode__ results in horribly hard to debug bugs — at Initial Version

Reported by: Simon Willison Owned by: nobody
Component: contrib.admin Version: dev
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I hit a nasty bug where weird unicode errors were being thrown in the admin application, which it turned out was caused because I was returning a bytestring from a unicode method. It would be great if Django could spot this mistake and throw a more humanly readable exception. This might just involve a few assertions in the admin code.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top