username = models.CharField(
_('username'),
max_length=150,
unique=True,
help_text=_('Required. 150 characters or fewer. Letters, digits and
@/./+/-/_ only.'),
validators=[ validators.RegexValidator( r'^[\w.@+-]+$',
It looks as if you could just clear the LOCALE
<https://docs.python.org/2/library/re.html#re.LOCALE> and UNICODE
<https://docs.python.org/2/library/re.html#re.UNICODE> flags, to restrict
the allowable characters.
I don't think you raised this in the dev mailing
list https://groups.google.com/forum/#!searchin/django-developers/password
You raised an issue in Trac, which is different. I agree with Michal that
this is worth looking at, and will pop it into a post in the dev list.
cheers -- Rick
django/contrib/auth/models.py line 308 or so
https://docs.python.org/2/library/re.html \wWhen the LOCALE
<https://docs.python.org/2/library/re.html#re.LOCALE> and UNICODE
<https://docs.python.org/2/library/re.html#re.UNICODE> flags are not
specified, matches any alphanumeric character and the underscore; this is
equivalent to the set [a-zA-Z0-9_]. With LOCALE
<https://docs.python.org/2/library/re.html#re.LOCALE>, it will match the
set [0-9_] plus whatever characters are defined as alphanumeric for the
current locale. If UNICODE
<https://docs.python.org/2/library/re.html#re.UNICODE> is set, this will
match the characters [0-9_] plus whatever is classified as alphanumeric in
the Unicode character properties database.
On Thursday, 21 April 2016 10:47:43 UTC-4, Arun S wrote:
>
> thanks for some very useful information.
>
> I did raise this in the dev forum but it was not agreed to be a question
> in that forum to discuss whether this should be taken up.
>
> I guess with all this input, this can be suggested tough.
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
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/5ec96f43-49e0-45eb-ba46-8644ba25af83%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.