Opened 17 years ago
Closed 17 years ago
#5112 closed (wontfix)
Unicode recipients in settings ADMINS and MANAGERS
Reported by: | zodi | Owned by: | nobody |
---|---|---|---|
Component: | django-admin.py runserver | Version: | dev |
Severity: | Keywords: | unicode Settings ADMINS MANAGERS | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Following the unicode merge.
Settings documentation should point out that full names for recipients in ADMINS and MANAGERS must be defined as u''
if it contains none ASCII characters.
If not it causes a tricky UnicodeDecodeError, disabling djangos traceback view and spitting out a plain text error.
(Or should it be considered a bug?)
Attachments (1)
Change History (5)
follow-up: 2 comment:1 by , 17 years ago
comment:2 by , 17 years ago
Ok now its just getting weirder.
I tried to reproduce the issue with a cleaner project and didn't get the same error until I set the DATABASE_ENGINE just give it a working db and user without running the first syncdb. Seams to be a Mysql issue somehow because sqlite3 works just fine.
Tested with:
- Win XP
- Python 2.4.3
- Django Latest svn
- Mysql 5.0.41 and 5.0.32 on debian via ssh tunnel
And yes it's the UTF-8 encoded bytestring that seams to be causing it
ADMINS = ( ('Your Nameåäö', 'your_email@domain.com'), )
fails
ADMINS = ( (u'Your Nameåäö', 'your_email@domain.com'), )
works
And this is the development server I'm testing with. Might just be my configuration?
comment:3 by , 17 years ago
Component: | Documentation → django-admin.py runserver |
---|---|
Owner: | changed from | to
Appears to only cause problems with the development server
And some clarification, the error is triggered when viewing a traceback view for a triggered error.
comment:4 by , 17 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
If you're using non-ASCII in a Python file, it needs a coding declaration like # -*- coding: utf-8 -*-
. Without one, you'll get errors like this. Django can't do anything differently here; the problem hits before we get a chance to do anything about it.
Are you saying the UTF-8 encoded bytestring (Python str objects that are UTF-8 encoded) do not work in those places?