User names not support Unicode in 1.5

57 views
Skip to first unread message

Григорий Крамаренко

unread,
Oct 30, 2013, 2:37:15 AM10/30/13
to django...@googlegroups.com
Hello.
My applications version 1.4.x contained Unicode characters in user names.
In version 1.5.x is not possible due to the validator. So I can't go on this version. 
Whether it is impossible to change in the future validator like this: re.compile(u'^[\W@+-]+$', re.UNICODE)?
Or are there other ways to solve this problem?

Timothy W. Cook

unread,
Oct 30, 2013, 8:47:17 AM10/30/13
to django...@googlegroups.com
What version of Python are you using?  Tried 3.3?



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cb4396f2-18c8-44f3-a564-bf3c4bbb1c45%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
MLHIM VIP Signup: http://goo.gl/22B0U
============================================
Timothy Cook, MSc           +55 21 94711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook

tim

unread,
Oct 30, 2013, 10:49:55 AM10/30/13
to django...@googlegroups.com
See https://code.djangoproject.com/ticket/20694 for a discussion of this.

In summary: "[Allowing unicode in user names] would be considered a regression for anyone who relies on Django to validate that usernames are ASCII-only. A custom user model (introduced in 1.5) is the way to go."

Mike Dewhirst

unread,
Oct 30, 2013, 4:52:19 PM10/30/13
to django...@googlegroups.com
On 31/10/2013 1:49am, tim wrote:
> See https://code.djangoproject.com/ticket/20694 for a discussion of this.
>
> In summary: "[Allowing unicode in user names] would be considered a
> regression for anyone who relies on Django to validate that usernames
> are ASCII-only. A custom user model (introduced in 1.5) is the way to go."

Are you saying that the only change required in a custom user model
would be a clean() method which permits and validates unicode user names?

If so, why is the validation actually done in the form?

Thanks

Mike


>
> On Wednesday, October 30, 2013 8:47:17 AM UTC-4, Timothy W. Cook wrote:
>
> What version of Python are you using? Tried 3.3?
>
>
>
> On Wed, Oct 30, 2013 at 4:37 AM, Григорий
> Крамаренко <djba...@gmail.com <javascript:>> wrote:
>
> Hello.
> My applications version 1.4.x contained Unicode characters in
> user names.
> In version 1.5.x is not possible due to the validator. So I
> can't go on this version.
> Whether it is impossible to change in the future validator like
> this: re.compile(u'^[\W@+-]+$', re.UNICODE)?
> Or are there other ways to solve this problem?
>
> --
> You received this message because you are subscribed to the
> Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to django-users...@googlegroups.com <javascript:>.
> To post to this group, send email to django...@googlegroups.com
> <javascript:>.
> <http://groups.google.com/group/django-users>.
> <https://groups.google.com/d/msgid/django-users/cb4396f2-18c8-44f3-a564-bf3c4bbb1c45%40googlegroups.com>.
> For more options, visit https://groups.google.com/groups/opt_out
> <https://groups.google.com/groups/opt_out>.
>
>
>
>
> --
> MLHIM VIP Signup: http://goo.gl/22B0U
> ============================================
> Timothy Cook, MSc +55 21 94711995
> MLHIM http://www.mlhim.org
> Like Us on FB: https://www.facebook.com/mlhim2
> <https://www.facebook.com/mlhim2>
> Circle us on G+: http://goo.gl/44EV5
> Google Scholar: http://goo.gl/MMZ1o
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
> <http://www.linkedin.com/in/timothywaynecook>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/05234015-4194-415f-a3cd-da4a2e6edec5%40googlegroups.com.

Alex Strickland

unread,
Oct 31, 2013, 2:46:43 AM10/31/13
to django...@googlegroups.com
On 2013-10-30 04:49 PM, tim wrote:

> See https://code.djangoproject.com/ticket/20694 for a discussion of this.
>
> In summary: "[Allowing unicode in user names] would be considered a
> regression for anyone who relies on Django to validate that usernames
> are ASCII-only. A custom user model (introduced in 1.5) is the way to go."

In view of the fact that the new top level domains can contain non Latin
characters maybe that decision should be reviewed?

--
Regards
Alex

tim

unread,
Nov 3, 2013, 12:06:14 PM11/3/13
to django...@googlegroups.com
I haven't looked into what would be required to allow unicode in usernames. If someone would like to dive in and write some documentation on how to do so that seems likely to be accepted as this has come up a couple times.
Reply all
Reply to author
Forward
0 new messages