Password Reset Via Email Implimented #3
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a pull request for #2 issue for the password reset via email:
Changes Done
- As these urls are moved to the EasyShop.py you can refer to them simply as {% url 'password-reset' %}etc,
EMAIL_HOST
in your settings.pyThis implimentaion of mail reset funtion physically sends a mail from a gamil account , for the testing purposes I used my own email(gmail) to send reset email:
How to configure:
In settings.py
These are the email and password of that email used to send the mails, here both of them are enviornment variables of my system
You can learn how to set enviornment variables and hide sensitive info here (this is a guide for linux/mac, you can search one from youtube for windows)
NOTE: here the password used is an app password as my account has 2 step verification (which I highly recomend using) and a you can see how to set them up here.You can use a less secure method too by going to your google settings here.You can read about it here.When using the less secure app method configure your 'EMAIL_PASS' to the actual password of the gmail account you are going to use.
If all things are configured correctly without errors and still the mail is not being sent, check the email enterd once if the email enterd in the form doesn't match any email in the database django would not send the email.
**PS : ** I am participating in the hacktoberfest event , could you please approve it.
A pull request can be approved either by giving it an overall approving review from maintainers, or by merging the pull request, or adding the 'hacktoberfest-accepted' label .