Skip to content

Commit

Permalink
Merge pull request #17 from thorgate/Change-template-context-class
Browse files Browse the repository at this point in the history
Update views.py
  • Loading branch information
jorgenader authored Jul 26, 2018
2 parents 9b62d75 + 6203be3 commit 2e4bdf1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tg_react/api/accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

# for email notifications
from django.template.loader import get_template
from django.template import Context

from tg_react.settings import get_password_recovery_url, get_post_login_handler, get_post_logout_handler, \
get_signup_skipped_fields
Expand Down Expand Up @@ -196,7 +195,7 @@ def send_email_notification(self, user, uid_and_token_b64):
confirm_reset_url = settings.SITE_URL + path

subject = _("Password restore")
context = Context({'user': user, 'confirm_reset_url': confirm_reset_url})
context = {'user': user, 'confirm_reset_url': confirm_reset_url}
text_content = get_template('emails/password_reset.txt').render(context)
html_content = get_template('emails/password_reset.html').render(context)

Expand Down

0 comments on commit 2e4bdf1

Please sign in to comment.