Conversation
1 similar comment
873b755 to
3687b1c
Compare
accountsplus/forms.py
Outdated
| from captcha.fields import ReCaptchaField | ||
|
|
||
|
|
||
| @contextmanager |
There was a problem hiding this comment.
@nasief you have this defined already in context_manager.py
| email = request.POST['email'] | ||
| try: | ||
| user = User.objects.get(email=email) | ||
| extra_email_context['email_lang'] = user.preferred_language or request.LANGUAGE_CODE |
There was a problem hiding this comment.
@nasief you may add email_lang to the extra_context parameter. Is there a reason why you need this extra_email_context
There was a problem hiding this comment.
@waseem-omar extra_context is not supplied to the sending email part of the Form PasswordChangeForm where email is sent. I went through the code and I found that extra_email_context is the context used with the send method.
c9921a9 to
21b77b4
Compare
| pyflakes | ||
| django-timezone-field>=2.0rc1 | ||
| django-localflavor | ||
| django-localflavor==1.3 |
There was a problem hiding this comment.
@danaspiegel do you think locking version like this the requirements.txt is acceptable? I think its used for testing only... so I'm assuming its ok... please note also Django also has fixed version above...
a028710 to
21b77b4
Compare
0dcf9b8 to
21b77b4
Compare
55a21ee to
c0b52af
Compare
| class CustomPasswordValidator(object): | ||
|
|
||
| def validate(self, password, user=None): | ||
| regex = '(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[A-Za-z\d]' |
There was a problem hiding this comment.
@nasief will this regex allow special characters? have you tested it locally?
There was a problem hiding this comment.
@waseem-omar Yes I did. The validator here only makes restrictions related to lowercase, uppercase and digits other characters are allowed.
No description provided.