From e57fca00b6b0af8f09f560d2d6fe16e1fe4b22da Mon Sep 17 00:00:00 2001 From: gzbender Date: Tue, 6 Aug 2019 02:24:29 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B0=D1=8F=20=D0=B3=D0=BB?= =?UTF-8?q?=D0=B0=D0=B2=D0=BD=D0=B0=D1=8F=20=D0=B8=20=D0=BC=D0=BE=D0=B1?= =?UTF-8?q?=D0=B8=D0=BB=D1=8C=D0=BD=D0=B0=D1=8F=20=D0=B2=D0=B5=D1=80=D1=81?= =?UTF-8?q?=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/views.py b/project/views.py index 58524407..2a4e9fea 100644 --- a/project/views.py +++ b/project/views.py @@ -115,12 +115,12 @@ class IndexView(TemplateView): 'online_coming_soon': online_coming_soon, 'school_schedule': school_schedule, 'course_items': Course.shuffle(Course.objects.filter(status=Course.PUBLISHED)[:3]), - 'is_purchased': camp_payment_exists, # school_payment_exists, + 'is_purchased': camp_payment_exists, 'camp_price': DrawingCampPayment.MONTH_PRICE, 'min_school_price': SchoolSchedule.objects.aggregate(Min('month_price'))['month_price__min'], 'school_schedules': SchoolSchedule.objects.filter(weekday__in=DrawingCampPayment.WEEKDAYS, is_camp=True), 'school_schedules_purchased': DrawingCampPayment.WEEKDAYS if camp_payment_exists else [], - 'teachers': teachers, + 'teachers': sorted(list(teachers), key=lambda t: 1 if t.email == 'sasha@lil.city' else 0, reverse=True), 'works_count': Payment.objects.filter(status__in=Payment.PW_PAID_STATUSES).count() * 7, 'subscription_ends': camp_payment.latest('date_end').date_end if camp_payment_exists else None, 'subscription_ends_humanize': camp_payment.latest('date_end').date_end_humanize if camp_payment_exists else None,