Opened 8 years ago

Closed 8 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



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)

LICENSE (1.5 KB) - added by Anand Kumria 8 years ago.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Anand Kumria

Attachment: LICENSE added

comment:1 Changed 8 years ago by Simon Charette

Has patch: unset

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., 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 in a matter of seconds.

I say keep it as it is.

comment:2 Changed 8 years ago by anonymous

Easy pickings: unset

comment:3 Changed 8 years ago by Aymeric Augustin

Resolution: wontfix
Status: newclosed

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.

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