username and allowed alphanumeric, why?

43 views
Skip to first unread message

Stefano Tranquillini

unread,
Apr 10, 2018, 5:10:33 AM4/10/18
to Django users
Hi all,

mostly curiosity, why does the username https://docs.djangoproject.com/en/1.11/ref/contrib/auth/#django.contrib.auth.models.User.username allow only _, @, +, . and - characters?
is there a reason for that?


Avraham Serour

unread,
Apr 10, 2018, 10:36:38 AM4/10/18
to django-users
It seems you read that wrong, usernames may contain alphanumeric and other characters.


--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/62ca69fe-ca26-4b48-ac19-4f4887dce08a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Melvyn Sopacua

unread,
Apr 11, 2018, 10:03:04 AM4/11/18
to django...@googlegroups.com
Yeah. It's explained a few lines below in the box titled "Usernames and
unicode". The special chars mentioned are just as random I presume.


--
Melvyn Sopacua

Stefano Tranquillini

unread,
Apr 12, 2018, 9:59:50 AM4/12/18
to Django users
My question was related why only that set of extrachars, adding a '=' is a dangerous step or not?
Reading the rest of the page it seems that everyhing is supported with unicode.

Melvyn Sopacua

unread,
Apr 19, 2018, 5:48:49 PM4/19/18
to django...@googlegroups.com
On donderdag 12 april 2018 15:59:50 CEST Stefano Tranquillini wrote:
> My question was related why only that set of extrachars, adding a '=' is a
> dangerous step or not?
> Reading the rest of the page it seems that everyhing is supported with
> unicode.

Everything except non-printables and control characters ("the usual"). Adding
a = poses no danger.

--
Melvyn Sopacua
Reply all
Reply to author
Forward
0 new messages