diff --git a/apps/auth/templates/auth/success-verification.html b/apps/auth/templates/auth/success-verification.html new file mode 100644 index 00000000..f030b83c --- /dev/null +++ b/apps/auth/templates/auth/success-verification.html @@ -0,0 +1,18 @@ +{% extends "templates/lilcity/index.html" %} + +{% block content %} +
+
+
+
Email подтверждён!
+
+

Через несколько секунд Вас перенаправят на главную страницу.

+

Или нажмите кнопку ниже.

+
+ +
+
+
+{% endblock content %} diff --git a/apps/auth/urls.py b/apps/auth/urls.py index e4278014..8adfed45 100644 --- a/apps/auth/urls.py +++ b/apps/auth/urls.py @@ -7,6 +7,7 @@ urlpatterns = [ path('logout/', views.LogoutView.as_view(), name="logout"), path('login/', views.LoginView.as_view(), name="login"), path('verification-email//', views.VerificationEmailView.as_view(), name="verification-email"), + path('success-verification-email/', views.SuccessVerificationEmailView.as_view(), name="success-verification-email"), path('facebook_login/', views.FacebookLoginOrRegistration.as_view(), name="facebook_login"), path('password_reset/', views.PasswordResetView.as_view(), name="password_reset"), diff --git a/apps/auth/views.py b/apps/auth/views.py index 9dccdbe9..0c0d248c 100644 --- a/apps/auth/views.py +++ b/apps/auth/views.py @@ -9,7 +9,7 @@ from django.http import JsonResponse from django.urls import reverse_lazy from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt -from django.views.generic import FormView, View +from django.views.generic import FormView, View, TemplateView from django.views.generic.edit import BaseFormView from django.shortcuts import redirect @@ -83,11 +83,16 @@ class VerificationEmailView(View): if is_valid_token: request.user.is_email_proved = True request.user.save() - return JsonResponse({"success": True}) + login(request, request.user) + return redirect(reverse_lazy('lilcity:success-verification-email')) else: return JsonResponse({"success": False}, status=400) +class SuccessVerificationEmailView(TemplateView): + template_name = 'auth/success-verification.html' + + class PasswordResetView(views.PasswordContextMixin, BaseFormView): email_template_name = "auth/password_reset.html" subject_template_name = "auth/password_reset_subject.txt" diff --git a/apps/course/templates/course/_items.html b/apps/course/templates/course/_items.html index c76a936b..af350f5c 100644 --- a/apps/course/templates/course/_items.html +++ b/apps/course/templates/course/_items.html @@ -42,7 +42,9 @@ {% endif %}
-
{{ course.author.get_full_name }}
+ +
{{ course.author.get_full_name }}
+
{{ course.created_at_humanize }}
{% data_liked user course as liked %} diff --git a/apps/course/templates/course/course.html b/apps/course/templates/course/course.html index 2314abc1..cf994653 100644 --- a/apps/course/templates/course/course.html +++ b/apps/course/templates/course/course.html @@ -15,7 +15,14 @@
Вернуться
- +
{{ course.title }}
{{ course.short_description }}
-
- {% if course.author.photo %} -
- -
- {% else %} -
- -
- {% endif %} -
-
{{ course.author.get_full_name }}
- +
@@ -113,7 +122,10 @@
-
{% endif %}
+{% if user.is_authenticated %}
@@ -238,6 +251,7 @@
+{% endif %}
Галерея итогов обучения
@@ -309,23 +323,25 @@
Как просто научиться рисовать простых персонажей.
Этот курс поможет детям узнать о том как из простых форм создавать веселый и харизматичных персонажей.
-
- {% if course.author.photo %} -
- -
- {% else %} -
- -
- {% endif %} -
-
{{ course.author.get_full_name }}
- +
@@ -353,7 +369,14 @@
{{ course.price|floatformat:"-2" }}₽
- +
@@ -362,13 +385,13 @@
Задавайте вопросы:
+ {% if user.is_authenticated %}
- {% if user.is_authenticated %}
В ответ на этот комментарий. Отменить @@ -377,11 +400,11 @@
- {% else %} -
Только зарегистрированные пользователи могут оставлять комментарии.
- {% endif %}
+ {% else %} +
Только зарегистрированные пользователи могут оставлять комментарии.
+ {% endif %}
{% include "./blocks/comments.html" with object=course %}
diff --git a/apps/course/templates/course/lesson.html b/apps/course/templates/course/lesson.html index 5a76111d..19b11558 100644 --- a/apps/course/templates/course/lesson.html +++ b/apps/course/templates/course/lesson.html @@ -82,6 +82,7 @@
Задавайте вопросы:
+ {% if user.is_authenticated %}
@@ -93,6 +94,9 @@
+ {% else %} +
Только зарегистрированные пользователи могут оставлять комментарии.
+ {% endif %}
{% include "./blocks/comments.html" with object=lesson %}
diff --git a/project/templates/lilcity/index.html b/project/templates/lilcity/index.html index be860361..6cc905d7 100644 --- a/project/templates/lilcity/index.html +++ b/project/templates/lilcity/index.html @@ -85,9 +85,9 @@
О школе
- + {% comment %}
Процесс
-
+ {% endcomment %}
Преимущества
@@ -97,21 +97,24 @@
Галерея
+ +
Преподаватели
+
Расписание
- -
Преподаватели
+
+
Партнеры
- + {% comment %}
Частые вопросы
-
- + {% endcomment %} + {% comment %}
Оплата
-
- + {% endcomment %} + {% comment %}
Контакты
-
+ {% endcomment %}
ВИДЕО-КУРСЫ diff --git a/project/templates/lilcity/main.html b/project/templates/lilcity/main.html index 582ae596..be8d39ef 100644 --- a/project/templates/lilcity/main.html +++ b/project/templates/lilcity/main.html @@ -5,7 +5,7 @@
Первая онлайн-школа креативного мышления для детей! 5+
- КУПИТЬ ДОСУП ЗА 2000р. в мес. + КУПИТЬ ДОСТУП ОТ 2000р. в мес.
@@ -418,6 +418,40 @@
+
+
Суббота
+
+
Персонаж.
+
Учимся создавать персонажей из простых форм. Изучаем характеры и эмоции.
+
+ +
Cамое главное - иметь альбом или блокнот с пустыми страницами (без линий и клеток) плотной гладкой бумагой, формат + А4. Рисовать будем цветными карандашами, а также простым, мягкостью B2. Иногда пригодятся вырезки из журналов + и клей-карандаш.
+
+
+
+
+
Воскресенье
+
+
Персонаж.
+
Учимся создавать персонажей из простых форм. Изучаем характеры и эмоции.
+
+ +
Cамое главное - иметь альбом или блокнот с пустыми страницами (без линий и клеток) плотной гладкой бумагой, формат + А4. Рисовать будем цветными карандашами, а также простым, мягкостью B2. Иногда пригодятся вырезки из журналов + и клей-карандаш.
+
+
+
Распечатать расписание чтобы не забыть
@@ -559,7 +593,9 @@
-
Наши партнеры
+ +
Наши партнеры
+