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/templates/auth/password_reset_confirm.html b/apps/auth/templates/auth/password_reset_confirm.html index 44d9d64f..4c61eece 100644 --- a/apps/auth/templates/auth/password_reset_confirm.html +++ b/apps/auth/templates/auth/password_reset_confirm.html @@ -1,12 +1,38 @@ +{% extends "templates/lilcity/index.html" %} +{% load static %} + +{% block content %} {% if validlink %} -

Change password

-
- {% csrf_token %} - {{ form.as_p }} - -
-{% else %} -

- The password reset link was invalid, possibly because it has already been used. - Please request a new password reset. -

\ No newline at end of file +
+
+
+
Смена пароля
+
+
+
+
+
+
+ {% csrf_token %} +
+
Новый пароль
+
+ +
+
+
+
Повторите пароль
+
+ +
+
+ +
+ {% else %} +

+ The password reset link was invalid, possibly because it has already been used. Please request a new password reset. +

+ {% endif %} +
+
+{% endblock content %} \ 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(): diff --git a/apps/course/templates/course/inclusion/category_items.html b/apps/course/templates/course/inclusion/category_items.html index 2d9adfd5..359b57ad 100644 --- a/apps/course/templates/course/inclusion/category_items.html +++ b/apps/course/templates/course/inclusion/category_items.html @@ -1,5 +1,5 @@ -{% for category in category_items %} -
-
{{ category.title }}
+{% for cat in category_items %} +
+
{{ cat.title }}
{% endfor %} \ No newline at end of file diff --git a/apps/course/views.py b/apps/course/views.py index 8f5c7d14..2cf2b003 100644 --- a/apps/course/views.py +++ b/apps/course/views.py @@ -176,6 +176,12 @@ class CoursesView(ListView): filtered = CourseFilter(self.request.GET, queryset=queryset) return filtered.qs + def get_context_data(self): + context = super().get_context_data() + filtered = CourseFilter(self.request.GET) + context.update(filtered.data) + return context + def get_template_names(self): if self.request.is_ajax(): return 'course/course_items.html'