Opened 13 years ago
Closed 13 years ago
#16375 closed Cleanup/optimization (wontfix)
PEP 0263 for generated project and apps
Reported by: | Anand Kumria | Owned by: | nobody |
---|---|---|---|
Component: | Core (Other) | Version: | 1.3 |
Severity: | Normal | Keywords: | UTF8 |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi,
I have recently been working with a developer who does not natively speak English. This is the first time using Python and Django and as soon as they entered non-Ascii information into the models and view files of their app., things broke.
Attached is a patch which puts the PEP 0263 heading (#encoding: utf-8) on files that both 'startapp' and 'startproject' generate.
Attachments (1)
Change History (4)
by , 13 years ago
comment:1 by , 13 years ago
Has patch: | unset |
---|
comment:2 by , 13 years ago
Easy pickings: | unset |
---|
comment:3 by , 13 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Since the templates don't contain non-ASCII characters, they don't need this header.
Django assumes developers know Python; if they don't, they should read a Python tutorial first.
Given that I'm the second person here to think it isn't a good idea, I will close the ticket.
I think you uploaded the wrong file.
In my not natively English speaking opinion I dont think that's the right approach for this issue.
First this is a python issue and second even if the header is provided for most used django-ish modules (models, tests, urls, ...) chances are that one will have to create another non automatically created module (i.e. forms.py, task.py) and will be left scratching his head since he never encountered this issue.
When I first encountered this issue, while i was learning python, I googled the exception and found the fix and explanations http://www.evanjones.ca/python-utf8.html in a matter of seconds.
I say keep it as it is.