Opened 14 years ago
Closed 14 years ago
#15404 closed (wontfix)
"from __future__ import unicode_literals" in "settings.py"
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Uncategorized | Version: | 1.2 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
good day!
if: in file my_web_site/settings.py to insert line:
from __future__ import unicode_literals
than: command...
python2.6 -m my_web_site.manage test
....showing many many many many errors (errors related to unicode)
at least that errors related with parameters:
- DATABASES
- SECRET_KEY
(this parameters no-error only in byte-strings, but not unicode)
but Django-documentation say that:
Django natively supports Unicode data everywhere. (http://docs.djangoproject.com/en/dev/ref/unicode/)
thanks!
Attachments (3)
Change History (5)
by , 14 years ago
Attachment: | ERRORS-settings.py added |
---|
by , 14 years ago
Attachment: | error-test-output.txt added |
---|
by , 14 years ago
Attachment: | NO-ERRORS-settings.py added |
---|
comment:2 by , 14 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
We natively support unicode, but we don't natively support Python 3 (at least, not yet). The {{future}} call you describe exists specifically as a Python 3 migration aid.
This will become a legitimate bug when we actually claim some level of Python 3 support, but until then, I'm going to mark this wontfix.
Not all of those errors are related to unicode - most of them should disappear on lastest 1.2.X version. I runned Django's full test suite with
SECRET_KEY
being unicode andDATABASES
containing unicode keys and only errors I get are related toSECRET_KEY
. IMHO, there is nothing to fix here, becauseSECRET_KEY
should be a byte-string - after all it's a series of random bytes.Could you provide an easy way to reproduce an error related to DATABASES setting ?