From 3f750805dd110a68daa8c4de3848bc311a635146 Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Mon, 23 Apr 2018 20:01:54 +0300 Subject: [PATCH] Clear not needed tabs & UserView --- apps/user/templates/user/profile.html | 29 --------------------------- apps/user/views.py | 22 -------------------- 2 files changed, 51 deletions(-) diff --git a/apps/user/templates/user/profile.html b/apps/user/templates/user/profile.html index 8a2371b0..f1a47378 100644 --- a/apps/user/templates/user/profile.html +++ b/apps/user/templates/user/profile.html @@ -71,14 +71,6 @@ КУРСЫ {% endif %} - - {% comment %} - {% endcomment %}
@@ -97,27 +89,6 @@
{% endif %} -
-
-
- {% include "course/school.html" %} -
-
-
- {% comment %}
-
-
- {% include "course/course_items.html" with course_items=pending %} -
-
-
-
-
-
- {% include "course/course_items.html" with course_items=drafts %} -
-
-
{% endcomment %} diff --git a/apps/user/views.py b/apps/user/views.py index e3c4b22c..1c0e77b6 100644 --- a/apps/user/views.py +++ b/apps/user/views.py @@ -53,12 +53,6 @@ class UserView(DetailView): context['published'] = Course.objects.filter( author=self.object, ) - context['pending'] = Course.objects.filter( - author=self.object, status=Course.PENDING - ) - context['drafts'] = Course.objects.filter( - author=self.object, status=Course.DRAFT - ) context['paid'] = Course.objects.filter( payments__in=CoursePayment.objects.filter( user=self.object, @@ -69,22 +63,6 @@ class UserView(DetailView): ], ), ).distinct() - school_payment = SchoolPayment.objects.filter( - user=self.object, - date_start__lte=now(), - date_end__gt=now(), - status__in=[ - Pingback.PINGBACK_TYPE_REGULAR, - Pingback.PINGBACK_TYPE_GOODWILL, - Pingback.PINGBACK_TYPE_RISK_REVIEWED_ACCEPTED, - ], - ).last() - context['school_payment'] = school_payment - if school_payment and school_payment.date_end: - context['school_days_left'] = (school_payment.date_end - now().date()).days - context['school_schedules'] = SchoolSchedule.objects.filter( - weekday__in=school_payment.weekdays if school_payment else [], - ) return context