-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support language on user level #31
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nasief you have this defined already in context_manager.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@waseem-omar Done!
accountsplus/views.py
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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
@@ -4,7 +4,7 @@ flake8 | |||
pep8 | |||
pyflakes | |||
django-timezone-field>=2.0rc1 | |||
django-localflavor | |||
django-localflavor==1.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nasief will this regex allow special characters? have you tested it locally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@waseem-omar Yes I did. The validator here only makes restrictions related to lowercase, uppercase and digits other characters are allowed.
No description provided.