-
Notifications
You must be signed in to change notification settings - Fork 81
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
Bugfix/#724 #1212
Bugfix/#724 #1212
Conversation
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.
Hi @aklife97, thank you for your contribution.
Before we we can proceed with your PR, I would like to ask you to make sure your build passes on Travis. The build is failing because your code violates PEP-8 conventions. You run the linter locally in your VM using ./runtests.py --lint
from the directory /vagrant
to find out which lines were not accepted.
@oliverroick Fixed the code to pass the PEP8 violations. Will not forget to lint before sending other pull requests :) |
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.
Hi @aklife97, thank you for making the changes. What you have done so far looks good.
Your approach, however, does not send a confirmation email when the password is changed after a reset. Could you try a find a way to do that?
Also, instead of hard coding the email text, it is better to use a template and mark the text for translation so we can send the email in the user's preferred language. Using a template also allows us to send the same email in other cases if we ever need to.
@oliverroick Hi, |
Don't worry about running The reason you don't see a translated message is probably because you haven't provide a translation or the translations are not compiled. That said, you don't need to provide translations, we're using Transifex for that. Only mark it for translation and that's it |
@oliverroick |
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.
Hi @aklife97, thanks for making the changes. There is a small code style issue I would like you to fix; please see the comment in the code.
Could you also add tests to verify that the email is sent? I would add tests to for both forms and serializers to verify this works across different access points.
Thanks again!
def password_changed_reset(sender, request, user, **kwargs): | ||
msg_body = get_template( | ||
"accounts/email/password_change_successful.txt" | ||
).render(Context({'user': user})) |
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.
The context is not used in the template; there's no need to create and pass it.
This PR has been inactive for two weeks. Closing this in favour of #1353. |
Proposed changes in this pull request
When should this PR be merged
Risks
Follow up actions
Checklist (for reviewing)
General
migration
label if a new migration is added.Functionality
Code
Tests
Documentation