From ade463616bc6434e6c59229c06107a616e68c13a Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Thu, 15 Feb 2018 09:20:32 +0300 Subject: [PATCH] LIL-234. Add simple templates for notification & payments settings --- .../templates/user/notification-settings.html | 71 +++++++++++++++++++ apps/user/templates/user/payment-history.html | 69 ++++++++++++++++++ .../user/templates/user/profile-settings.html | 6 +- apps/user/templates/user/profile.html | 2 +- apps/user/views.py | 16 ++++- project/urls.py | 6 +- 6 files changed, 163 insertions(+), 7 deletions(-) create mode 100644 apps/user/templates/user/notification-settings.html create mode 100644 apps/user/templates/user/payment-history.html diff --git a/apps/user/templates/user/notification-settings.html b/apps/user/templates/user/notification-settings.html new file mode 100644 index 00000000..fee35ff5 --- /dev/null +++ b/apps/user/templates/user/notification-settings.html @@ -0,0 +1,71 @@ +{% extends "templates/lilcity/index.html" %} {% load static %} {% block content %} +
+ +
+
+
+
+
Подтверждение почты
+
На электронный адрес + sasha@lil.city отправлено письмо с кодом подтверждения. Введите код, чтобы подтвердить почту.
+
+
+
+ +
+
+ +
+
+ Если у вас нет кода или письмо где-то затерялось, вы можете получить новый код подтверждения. Отправить новый код? +
+
+
+
+
+
+
+
+
Уведомления и рассылка
+ + + + + + + +
+
+ +
+
+
+
+{% endblock content %} \ No newline at end of file diff --git a/apps/user/templates/user/payment-history.html b/apps/user/templates/user/payment-history.html new file mode 100644 index 00000000..fcf26606 --- /dev/null +++ b/apps/user/templates/user/payment-history.html @@ -0,0 +1,69 @@ +{% extends "templates/lilcity/index.html" %} {% load static %} {% block content %} +
+ +
+
+
+
Вывести деньги со счета
+
+
+
На вашем счету 20. 123 рублей
+
+
СУММА
+
+ +
+
Размер выводимой суммы не должно быть менее 2000 рублей.
+
+
+
НОМЕР КРЕДИТНОЙ КАРТЫ + * +
+
+ +
+ +
+
+
+
+
+ +
+
+
+
+
+
+
История платежей
+
+
+
+
Ноябрь. Школа Lil City
+
2000.00
+
Получено
+
+
+
Общий курс по иллюстрации
+
2000.00
+
Получено
+
+
+
Ноябрь. Школа Lil City
+
2000.00
+
Получено
+
+
+
+ +
+
+
+
+{% endblock content %} diff --git a/apps/user/templates/user/profile-settings.html b/apps/user/templates/user/profile-settings.html index 6c069960..ce6e1842 100644 --- a/apps/user/templates/user/profile-settings.html +++ b/apps/user/templates/user/profile-settings.html @@ -2,9 +2,9 @@
diff --git a/apps/user/templates/user/profile.html b/apps/user/templates/user/profile.html index d655a3ad..0e094c31 100644 --- a/apps/user/templates/user/profile.html +++ b/apps/user/templates/user/profile.html @@ -2,7 +2,7 @@
- Редактировать + Редактировать {% if user.photo %}
diff --git a/apps/user/views.py b/apps/user/views.py index 5b8675fd..4de9a29a 100644 --- a/apps/user/views.py +++ b/apps/user/views.py @@ -3,7 +3,7 @@ from PIL import Image from os.path import splitext from django.contrib.auth import login from django.shortcuts import render, reverse -from django.views.generic import DetailView, UpdateView +from django.views.generic import DetailView, UpdateView, TemplateView from django.contrib import messages from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required, permission_required @@ -37,6 +37,20 @@ class UserView(DetailView): return context +class NotificationEditView(TemplateView): + template_name = 'user/notification-settings.html' + + def get(self, request, pk=None): + return super().get(request) + + +class PaymentHistoryView(TemplateView): + template_name = 'user/payment-history.html' + + def get(self, request, pk=None): + return super().get(request) + + class UserEditView(UpdateView): model = User template_name = 'user/profile-settings.html' diff --git a/project/urls.py b/project/urls.py index 94812354..90fa3814 100644 --- a/project/urls.py +++ b/project/urls.py @@ -24,7 +24,7 @@ from apps.course.views import ( lessoncomment, CourseEditView, ) from apps.course.models import Course -from apps.user.views import UserView, UserEditView +from apps.user.views import UserView, UserEditView, NotificationEditView, PaymentHistoryView urlpatterns = [ path('admin/', admin.site.urls), @@ -40,7 +40,9 @@ urlpatterns = [ path('lesson//comment', lessoncomment, name='lessoncomment'), path('search/', SearchView.as_view(), name='search'), path('user//', UserView.as_view(), name='user'), - path('user//edit/', UserEditView.as_view(), name='user-edit'), + path('user//edit', UserEditView.as_view(), name='user-edit-profile'), + path('user//notifications', NotificationEditView.as_view(), name='user-edit-notifications'), + path('user//payments', PaymentHistoryView.as_view(), name='user-edit-payments'), path('privacy', TemplateView.as_view(template_name="templates/lilcity/privacy_policy.html"), name='privacy'), path('terms', TemplateView.as_view(template_name="templates/lilcity/terms.html"), name='terms'), path('refund-policy', TemplateView.as_view(template_name="templates/lilcity/refund_policy.html"), name='refund_policy'),