Fix reset password emal templates

remotes/origin/hasaccess
Ivlev Denis 8 years ago
parent 0d801d9510
commit b6195f51d4
  1. 12
      apps/auth/templates/auth/password_reset.html
  2. 2
      apps/auth/templates/auth/password_reset.txt
  3. 5
      apps/auth/views.py

@ -1,2 +1,10 @@
Someone asked for password reset for email {{ email }}. Follow the link below:
{{ protocol}}://{{ domain }}{% url 'lilcity:password_reset_confirm' uidb64=uid token=token %}
{% extends "notification/email/_base.html" %}
{% block content %}
<p style="margin: 0 0 20px">Для восстановления пароля нажмите кнопку ниже.</p>
<div style="margin-bottom: 10px;">
<a href="{{ protocol}}://{{ domain }}{% url 'lilcity:password_reset_confirm' uidb64=uid token=token %}" style="text-decoration: none; position: relative; padding: 13px 24px 12px; background-image: linear-gradient(-225deg, #D1FF7F 0%, #56FFFD 100%); border-radius: 3px; font-size: 12px; color: #191919; text-transform: uppercase; letter-spacing: 2px; text-align: center; transition: all .2s; z-index: 2;">Нажмите для восстановления</a>
<p>Или скопируйте ссылку ниже, и вставьте её в адресную строку браузера.</p>
<p>{{ protocol}}://{{ domain }}{% url 'lilcity:password_reset_confirm' uidb64=uid token=token %}</p>
</div>
{% endblock content %}

@ -0,0 +1,2 @@
Восстановление пароля для {{ email }}. Перейдите по ссылке ниже:
{{ protocol}}://{{ domain }}{% url 'lilcity:password_reset_confirm' uidb64=uid token=token %}

@ -94,13 +94,13 @@ class SuccessVerificationEmailView(TemplateView):
class PasswordResetView(views.PasswordContextMixin, BaseFormView):
email_template_name = "auth/password_reset.html"
email_template_name = 'auth/password_reset.txt'
subject_template_name = "auth/password_reset_subject.txt"
form_class = views.PasswordResetForm
extra_email_context = None
from_email = None
html_email_template_name = None
html_email_template_name = "auth/password_reset.html"
title = 'Password reset'
token_generator = views.default_token_generator
@ -139,7 +139,6 @@ class FacebookLoginOrRegistration(View):
return JsonResponse({"success": False})
fb_id = data.get('id')
print(fb_id)
lilcity_user_settings = User.objects.filter(fb_id=fb_id)
if lilcity_user_settings.count():

Loading…
Cancel
Save