Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#25589 closed New feature (fixed)

startapp command should support unicode name

Reported by: A-hông Owned by: Yoong Kang Lim
Component: Internationalization Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In python3, variable/package/filename is ok with begining with Unicode character.
But the startapp command cannot do that.

python manage.py startapp 維護團隊
CommandError: '維護團隊' is not a valid app name. Please make sure the name begins with a letter or underscore.

Change History (5)

comment:1 by Claude Paroz, 9 years ago

Component: UncategorizedInternationalization
Triage Stage: UnreviewedAccepted
Type: UncategorizedNew feature
Version: 1.8master

I think we should indeed follow Python policy. See also PEP 3131.
Could you investigate about existing validators for such identifiers?

comment:2 by Yoong Kang Lim, 9 years ago

Owner: changed from nobody to Yoong Kang Lim
Status: newassigned

comment:3 by Tim Graham, 9 years ago

Has patch: set
Triage Stage: AcceptedReady for checkin
Last edited 9 years ago by Tim Graham (previous) (diff)

comment:4 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: assignedclosed

In 3f300efe:

Fixed #25589 -- Allowed startapp/project to create apps with Unicode characters in the name.

comment:5 by Tim Graham <timograham@…>, 9 years ago

In 8935934:

Refs #25589 -- Fixed admin_scripts test failure on Windows.

Traceback (most recent call last):

File "tests\admin_scripts\tests.py", line 646, in test_startapp_unicode_name

content = f.read()

File "lib\encodings\cp1252.py", line 23, in decode

return codecs.charmap_decode(input,self.errors,decoding_table)[0]

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 46: character maps to <undefined>

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