diff --git a/apps/auth/templates/auth/password_reset.html b/apps/auth/templates/auth/password_reset.html index 8af5626f..0467d253 100644 --- a/apps/auth/templates/auth/password_reset.html +++ b/apps/auth/templates/auth/password_reset.html @@ -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 %} \ No newline at end of file +{% extends "notification/email/_base.html" %} + +{% block content %} +

Для восстановления пароля нажмите кнопку ниже.

+
+ Нажмите для восстановления +

Или скопируйте ссылку ниже, и вставьте её в адресную строку браузера.

+

{{ protocol}}://{{ domain }}{% url 'lilcity:password_reset_confirm' uidb64=uid token=token %}

+
+{% endblock content %} diff --git a/apps/auth/templates/auth/password_reset.txt b/apps/auth/templates/auth/password_reset.txt new file mode 100644 index 00000000..dfd0f38b --- /dev/null +++ b/apps/auth/templates/auth/password_reset.txt @@ -0,0 +1,2 @@ +Восстановление пароля для {{ email }}. Перейдите по ссылке ниже: +{{ protocol}}://{{ domain }}{% url 'lilcity:password_reset_confirm' uidb64=uid token=token %} \ No newline at end of file diff --git a/apps/auth/views.py b/apps/auth/views.py index 0c0d248c..37bab7b3 100644 --- a/apps/auth/views.py +++ b/apps/auth/views.py @@ -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():