From f995da9f1c44d6d6e431950ba05721e058aed302 Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 2 Jul 2018 16:29:18 +0300 Subject: [PATCH 01/13] ?playsinline=0 option --- apps/school/templates/school/livelesson_detail.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/school/templates/school/livelesson_detail.html b/apps/school/templates/school/livelesson_detail.html index 92ca42e1..db920c67 100644 --- a/apps/school/templates/school/livelesson_detail.html +++ b/apps/school/templates/school/livelesson_detail.html @@ -10,7 +10,7 @@
{{ livelesson.short_description }}
{% if livelesson.stream_index %} - Если видео не загрузилось обновите страницу From 2a6cd9c58b43f02924d4ec8a3ec8a69627c94cb4 Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 2 Jul 2018 16:40:49 +0300 Subject: [PATCH 02/13] access hotfix --- .../templates/school/livelesson_detail.html | 2 +- apps/school/views.py | 40 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/apps/school/templates/school/livelesson_detail.html b/apps/school/templates/school/livelesson_detail.html index db920c67..92ca42e1 100644 --- a/apps/school/templates/school/livelesson_detail.html +++ b/apps/school/templates/school/livelesson_detail.html @@ -10,7 +10,7 @@
{{ livelesson.short_description }}
{% if livelesson.stream_index %} - Если видео не загрузилось обновите страницу diff --git a/apps/school/views.py b/apps/school/views.py index ae9b64f0..bb1f571d 100644 --- a/apps/school/views.py +++ b/apps/school/views.py @@ -61,26 +61,26 @@ class LiveLessonsDetailView(DetailView): def get(self, request, pk=None): response = super().get(request, pk=pk) - try: - school_payment = SchoolPayment.objects.get( - user=request.user, - add_days=False, - date_start__lte=now(), - date_end__gte=now(), - status__in=[ - Pingback.PINGBACK_TYPE_REGULAR, - Pingback.PINGBACK_TYPE_GOODWILL, - Pingback.PINGBACK_TYPE_RISK_REVIEWED_ACCEPTED, - ], - ) - except SchoolPayment.DoesNotExist: - school_payment = None - if request.user.role not in [User.ADMIN_ROLE, User.TEACHER_ROLE] and not ( - request.user.role == User.USER_ROLE and - school_payment and - school_payment.is_deliverable() - ): - raise Http404 + #try: + # school_payment = SchoolPayment.objects.get( + # user=request.user, + # add_days=False, + # date_start__lte=now(), + # date_end__gte=now(), + # status__in=[ + # Pingback.PINGBACK_TYPE_REGULAR, + # Pingback.PINGBACK_TYPE_GOODWILL, + # Pingback.PINGBACK_TYPE_RISK_REVIEWED_ACCEPTED, + # ], + # ) + #except SchoolPayment.DoesNotExist: + # school_payment = None + #if request.user.role not in [User.ADMIN_ROLE, User.TEACHER_ROLE] and not ( + # request.user.role == User.USER_ROLE and + # school_payment and + # school_payment.is_deliverable() + #): + # raise Http404 return response From 07be83fe06cab3bb5a934a9ab13d8cb356bc611b Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 2 Jul 2018 17:10:11 +0300 Subject: [PATCH 03/13] live video autoplay --- apps/school/templates/school/livelesson_detail.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/school/templates/school/livelesson_detail.html b/apps/school/templates/school/livelesson_detail.html index 92ca42e1..e7b2dc00 100644 --- a/apps/school/templates/school/livelesson_detail.html +++ b/apps/school/templates/school/livelesson_detail.html @@ -10,7 +10,7 @@
{{ livelesson.short_description }}
{% if livelesson.stream_index %} - Если видео не загрузилось обновите страницу From 811051f7c54e5441244cfa53506d852d1f940bf4 Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 2 Jul 2018 17:15:43 +0300 Subject: [PATCH 04/13] playsinline revert --- apps/school/templates/school/livelesson_detail.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/school/templates/school/livelesson_detail.html b/apps/school/templates/school/livelesson_detail.html index e7b2dc00..1bcb3227 100644 --- a/apps/school/templates/school/livelesson_detail.html +++ b/apps/school/templates/school/livelesson_detail.html @@ -10,7 +10,7 @@
{{ livelesson.short_description }}
{% if livelesson.stream_index %} - Если видео не загрузилось обновите страницу From a70e97d43acc9fa8ffa7697479f728c26cfb02a3 Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 2 Jul 2018 18:04:30 +0300 Subject: [PATCH 05/13] is_online period changed --- apps/school/models.py | 4 ++-- project/templates/blocks/promo.html | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/school/models.py b/apps/school/models.py index ead3f30a..24ce0590 100644 --- a/apps/school/models.py +++ b/apps/school/models.py @@ -44,7 +44,7 @@ class SchoolSchedule(models.Model): return dict(self.WEEKDAY_CHOICES).get(self.weekday, '') def is_online(self): - end_at = datetime.combine(now().today(), self.start_at) + timedelta(hours=2) + end_at = datetime.combine(now().today(), self.start_at) + timedelta(hours=1) return self.start_at <= now().time() and end_at.time() >= now().time() and self.weekday == now().isoweekday() def current_live_lesson(self): @@ -132,5 +132,5 @@ class LiveLesson(BaseModel, DeactivatedMixin): return False else: start_at = school_schedule.start_at - end_at = datetime.combine(now().today(), start_at) + timedelta(hours=2) + end_at = datetime.combine(now().today(), start_at) + timedelta(hours=1) return start_at <= now().time() and end_at.time() >= now().time() diff --git a/project/templates/blocks/promo.html b/project/templates/blocks/promo.html index 49fde3ee..53b7f7a9 100644 --- a/project/templates/blocks/promo.html +++ b/project/templates/blocks/promo.html @@ -12,7 +12,8 @@ Lil School — первая образовательная онлайн-платформа креативного мышления для детей
- Урок Рисовальный лагерь, Альбрехт Дюрер начнется сегодня в 17:00 + Урок Рисовальный лагерь, Альбрехт Дюрер завершен
+ Следующий урок пройдет 4 июля
{% if is_purchased %} From dceed7010b16d3fb3ca8733dee03a1019443d170 Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 2 Jul 2018 18:13:00 +0300 Subject: [PATCH 06/13] is_online period changed --- apps/school/views.py | 4 ++-- project/views.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/school/views.py b/apps/school/views.py index bb1f571d..7f4ab734 100644 --- a/apps/school/views.py +++ b/apps/school/views.py @@ -122,7 +122,7 @@ class SchoolView(TemplateView): end_at = datetime.combine(now_time.today(), school_schedule.start_at) online = ( school_schedule.start_at <= now_time.time() and - (end_at + timedelta(hours=2)).time() >= now_time.time() and + (end_at + timedelta(hours=1)).time() >= now_time.time() and school_schedule.current_live_lesson() ) if self.request.user.is_authenticated: @@ -183,7 +183,7 @@ class SummerSchoolView(TemplateView): end_at = datetime.combine(now_time.today(), school_schedule.start_at) online = ( school_schedule.start_at <= now_time.time() and - (end_at + timedelta(hours=2)).time() >= now_time.time() and + (end_at + timedelta(hours=1)).time() >= now_time.time() and school_schedule.current_live_lesson() ) if self.request.user.is_authenticated: diff --git a/project/views.py b/project/views.py index 61e62c90..6e4eca8d 100644 --- a/project/views.py +++ b/project/views.py @@ -31,7 +31,7 @@ class IndexView(TemplateView): end_at = datetime.combine(now_time.today(), school_schedule.start_at) online = ( school_schedule.start_at <= now_time.time() and - (end_at + timedelta(hours=2)).time() >= now_time.time() and + (end_at + timedelta(hours=1)).time() >= now_time.time() and school_schedule.current_live_lesson() ) date_now = now_time.date() From 88c863b2d24c854b2a3a8eb8fa89101fdd86b5b5 Mon Sep 17 00:00:00 2001 From: nikita Date: Tue, 3 Jul 2018 08:15:32 +0300 Subject: [PATCH 07/13] =?UTF-8?q?=D0=9F=D0=BE=D0=BA=D0=B0=D0=B7=D1=8B?= =?UTF-8?q?=D0=B2=D0=B0=D1=82=D1=8C=20=D1=81=D0=BC=D0=BE=D1=82=D1=80=D0=B5?= =?UTF-8?q?=D1=82=D1=8C=20=D1=83=D1=80=D0=BE=D0=BA=20=D1=82=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=BA=D0=BE=20=D0=B4=D0=BB=D1=8F=20=D0=B7=D0=B0=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D0=BD=D0=B5=D0=BD=D0=BD=D1=8B=D1=85=20=D0=BA=D1=83?= =?UTF-8?q?=D1=80=D1=81=D0=BE=D0=B2=20=D0=9F=D0=BE=D0=BA=D0=B0=D0=B7=D1=8B?= =?UTF-8?q?=D0=B2=D0=B0=D1=82=D1=8C=20=D0=B4=D0=B0=D1=82=D1=83=20=D1=83?= =?UTF-8?q?=D1=80=D0=BE=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit bef9ba5) --- apps/school/templates/blocks/_schedule_purchased_item.html | 4 ++-- apps/school/templates/summer/_schedule_purchased_item.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/school/templates/blocks/_schedule_purchased_item.html b/apps/school/templates/blocks/_schedule_purchased_item.html index 416a4f4f..5690d7aa 100644 --- a/apps/school/templates/blocks/_schedule_purchased_item.html +++ b/apps/school/templates/blocks/_schedule_purchased_item.html @@ -6,12 +6,12 @@ {{ school_schedule }}
{% if live_lesson %} - +
{{ live_lesson.date }}
{% endif %}
{{ school_schedule.start_at }} (МСК)
- {% if school_schedule.weekday in school_schedules_purchased and live_lesson %} + {% if school_schedule.weekday in school_schedules_purchased and live_lesson and live_lesson.title %} {% include './open_lesson.html' %} {% else %} {% include './day_pay_btn.html' %} diff --git a/apps/school/templates/summer/_schedule_purchased_item.html b/apps/school/templates/summer/_schedule_purchased_item.html index 416a4f4f..5690d7aa 100644 --- a/apps/school/templates/summer/_schedule_purchased_item.html +++ b/apps/school/templates/summer/_schedule_purchased_item.html @@ -6,12 +6,12 @@ {{ school_schedule }}
{% if live_lesson %} - +
{{ live_lesson.date }}
{% endif %}
{{ school_schedule.start_at }} (МСК)
- {% if school_schedule.weekday in school_schedules_purchased and live_lesson %} + {% if school_schedule.weekday in school_schedules_purchased and live_lesson and live_lesson.title %} {% include './open_lesson.html' %} {% else %} {% include './day_pay_btn.html' %} From 0d0652463f1d13e9baed961a6ab1df05f580a59f Mon Sep 17 00:00:00 2001 From: nikita Date: Tue, 3 Jul 2018 08:21:20 +0300 Subject: [PATCH 08/13] =?UTF-8?q?=D0=9F=D0=BE=D0=BA=D0=B0=D0=B7=D1=8B?= =?UTF-8?q?=D0=B2=D0=B0=D1=82=D1=8C=20=D1=81=D0=BC=D0=BE=D1=82=D1=80=D0=B5?= =?UTF-8?q?=D1=82=D1=8C=20=D1=83=D1=80=D0=BE=D0=BA=20=D1=82=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=BA=D0=BE=20=D0=B4=D0=BB=D1=8F=20=D0=B7=D0=B0=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D0=BD=D0=B5=D0=BD=D0=BD=D1=8B=D1=85=20=D0=BA=D1=83?= =?UTF-8?q?=D1=80=D1=81=D0=BE=D0=B2=20=D0=9F=D0=BE=D0=BA=D0=B0=D0=B7=D1=8B?= =?UTF-8?q?=D0=B2=D0=B0=D1=82=D1=8C=20=D0=B4=D0=B0=D1=82=D1=83=20=D1=83?= =?UTF-8?q?=D1=80=D0=BE=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../school/templates/blocks/_schedule_purchased_item.html | 8 +++++--- .../school/templates/summer/_schedule_purchased_item.html | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/apps/school/templates/blocks/_schedule_purchased_item.html b/apps/school/templates/blocks/_schedule_purchased_item.html index 5690d7aa..00656e4a 100644 --- a/apps/school/templates/blocks/_schedule_purchased_item.html +++ b/apps/school/templates/blocks/_schedule_purchased_item.html @@ -11,10 +11,12 @@
{{ school_schedule.start_at }} (МСК)
- {% if school_schedule.weekday in school_schedules_purchased and live_lesson and live_lesson.title %} - {% include './open_lesson.html' %} + {% if school_schedule.weekday in school_schedules_purchased %} + {% if live_lesson and live_lesson.title %} + {% include './open_lesson.html' %} + {% endif %} {% else %} - {% include './day_pay_btn.html' %} + {% include './day_pay_btn.html' %} {% endif %}
{% comment %} diff --git a/apps/school/templates/summer/_schedule_purchased_item.html b/apps/school/templates/summer/_schedule_purchased_item.html index 5690d7aa..00656e4a 100644 --- a/apps/school/templates/summer/_schedule_purchased_item.html +++ b/apps/school/templates/summer/_schedule_purchased_item.html @@ -11,10 +11,12 @@
{{ school_schedule.start_at }} (МСК)
- {% if school_schedule.weekday in school_schedules_purchased and live_lesson and live_lesson.title %} - {% include './open_lesson.html' %} + {% if school_schedule.weekday in school_schedules_purchased %} + {% if live_lesson and live_lesson.title %} + {% include './open_lesson.html' %} + {% endif %} {% else %} - {% include './day_pay_btn.html' %} + {% include './day_pay_btn.html' %} {% endif %}
{% comment %} From 7000f2456cc4db33267c664a7d100d9d6561713b Mon Sep 17 00:00:00 2001 From: nikita Date: Tue, 3 Jul 2018 08:27:23 +0300 Subject: [PATCH 09/13] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D1=82=D1=8C=20?= =?UTF-8?q?=D0=BB=D0=B8=D1=88=D0=BD=D1=8E=D1=8E=20=D0=BA=D0=BD=D0=BE=D0=BF?= =?UTF-8?q?=D0=BA=D1=83=20=C2=AB=D0=9F=D0=B5=D1=80=D0=B5=D0=B9=D1=82=D0=B8?= =?UTF-8?q?=20=D0=BA=20=D0=BE=D0=BF=D0=BB=D0=B0=D1=82=D0=B5=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/templates/blocks/about.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/project/templates/blocks/about.html b/project/templates/blocks/about.html index 4caf08de..0fd05e03 100644 --- a/project/templates/blocks/about.html +++ b/project/templates/blocks/about.html @@ -56,8 +56,6 @@ href="#" > {% if not is_purchased and not is_purchased_future %}купить доступ от {{ min_school_price }} руб./месяц{% endif %} - {% if is_purchased_future and not is_purchased %}ваша подписка начинается {{school_purchased_future.date_start}}{% endif %} - {% if is_purchased %}ваша подписка истекает {{ subscription_ends_humanize }}
перейти к оплате{% endif %} From 399a7ba53ef833431e9155c18196acd08d380202 Mon Sep 17 00:00:00 2001 From: nikita Date: Tue, 3 Jul 2018 08:30:54 +0300 Subject: [PATCH 10/13] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D1=82=D1=8C=20?= =?UTF-8?q?=D0=BB=D0=B8=D1=88=D0=BD=D1=8E=D1=8E=20=D0=BA=D0=BD=D0=BE=D0=BF?= =?UTF-8?q?=D0=BA=D1=83=20=C2=AB=D0=9F=D0=B5=D1=80=D0=B5=D0=B9=D1=82=D0=B8?= =?UTF-8?q?=20=D0=BA=20=D0=BE=D0=BF=D0=BB=D0=B0=D1=82=D0=B5=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/templates/blocks/about.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/project/templates/blocks/about.html b/project/templates/blocks/about.html index 0fd05e03..8deec906 100644 --- a/project/templates/blocks/about.html +++ b/project/templates/blocks/about.html @@ -44,19 +44,19 @@
- - {% if not is_purchased and not is_purchased_future %}купить доступ от {{ min_school_price }} руб./месяц{% endif %} - + > + купить доступ от {{ min_school_price }} руб./месяц + + {% endif %}
From 9d3f86cedec160c9f4dfb78594580f22bb43e702 Mon Sep 17 00:00:00 2001 From: nikita Date: Tue, 3 Jul 2018 08:36:46 +0300 Subject: [PATCH 11/13] =?UTF-8?q?=D0=A3=D0=BB=D1=83=D1=87=D1=88=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BD=D1=82=D0=B5=D0=BD?= =?UTF-8?q?=D1=82=D0=B0,=20=D0=B5=D1=81=D0=BB=D0=B8=20=D1=83=D1=80=D0=BE?= =?UTF-8?q?=D0=BA=20=D0=B5=D1=89=D0=B5=20=D0=BD=D0=B5=20=D1=81=D0=BE=D0=B7?= =?UTF-8?q?=D0=B4=D0=B0=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/school/templates/blocks/_schedule_purchased_item.html | 4 ++-- apps/school/templates/summer/_schedule_purchased_item.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/school/templates/blocks/_schedule_purchased_item.html b/apps/school/templates/blocks/_schedule_purchased_item.html index 00656e4a..b9d1db1f 100644 --- a/apps/school/templates/blocks/_schedule_purchased_item.html +++ b/apps/school/templates/blocks/_schedule_purchased_item.html @@ -36,12 +36,12 @@
-
{{ school_schedule.title }}{% if live_lesson %}, +
{{ school_schedule.title }}{% if live_lesson and live_lesson.title %}, {{ live_lesson.title }} {% endif %}
- {% if live_lesson %} + {% if live_lesson and live_lesson.short_description %} {{ live_lesson.short_description }} {% else %} {{ school_schedule.description }} diff --git a/apps/school/templates/summer/_schedule_purchased_item.html b/apps/school/templates/summer/_schedule_purchased_item.html index 00656e4a..b9d1db1f 100644 --- a/apps/school/templates/summer/_schedule_purchased_item.html +++ b/apps/school/templates/summer/_schedule_purchased_item.html @@ -36,12 +36,12 @@
-
{{ school_schedule.title }}{% if live_lesson %}, +
{{ school_schedule.title }}{% if live_lesson and live_lesson.title %}, {{ live_lesson.title }} {% endif %}
- {% if live_lesson %} + {% if live_lesson and live_lesson.short_description %} {{ live_lesson.short_description }} {% else %} {{ school_schedule.description }} From c64f61b5a0ac975ff0e2734a206fd44f095a1dee Mon Sep 17 00:00:00 2001 From: nikita Date: Tue, 3 Jul 2018 20:20:50 +0300 Subject: [PATCH 12/13] roistat checking fix --- project/templates/lilcity/index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/project/templates/lilcity/index.html b/project/templates/lilcity/index.html index 7f3fed4e..18e4135a 100644 --- a/project/templates/lilcity/index.html +++ b/project/templates/lilcity/index.html @@ -75,8 +75,7 @@ {% comment %} ROISTAT {% endcomment %} {% block foot %}{% endblock foot %} From aa20afb2cfc18290211e703611dd6666b9e9ac9b Mon Sep 17 00:00:00 2001 From: nikita Date: Tue, 3 Jul 2018 20:22:17 +0300 Subject: [PATCH 13/13] roistat checking fix --- project/templates/lilcity/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/templates/lilcity/index.html b/project/templates/lilcity/index.html index 18e4135a..e74656de 100644 --- a/project/templates/lilcity/index.html +++ b/project/templates/lilcity/index.html @@ -75,7 +75,7 @@ {% comment %} ROISTAT {% endcomment %} {% block foot %}{% endblock foot %}