Opened 17 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 Version 1

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 (last modified by Ramiro Morales)

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 (1)

comment:1 by Ramiro Morales, 17 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top