From a81b94680ff71b22b027ce074df9e0a3f6366685 Mon Sep 17 00:00:00 2001 From: gzbender Date: Thu, 4 Oct 2018 00:24:03 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BA=D0=BD=D0=BE?= =?UTF-8?q?=D0=BF=D0=BA=D0=B8=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=B8?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20=D0=B2=20=D0=BA=D1=83?= =?UTF-8?q?=D1=80=D1=81=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/course/models.py | 6 +++--- apps/course/templates/course/course.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/course/models.py b/apps/course/models.py index 9dce98b0..6272a318 100644 --- a/apps/course/models.py +++ b/apps/course/models.py @@ -175,9 +175,9 @@ class Course(BaseModel, DeactivatedMixin): shuffle(other) return featured + other else: - all = list(qs) - shuffle(all) - return all + all_courses = list(qs) + shuffle(all_courses) + return all_courses class Category(models.Model): diff --git a/apps/course/templates/course/course.html b/apps/course/templates/course/course.html index 5f20e006..25de6d78 100644 --- a/apps/course/templates/course/course.html +++ b/apps/course/templates/course/course.html @@ -26,7 +26,7 @@
Вернуться
{% if has_full_access %} - Редактировать + Редактировать {% endif %} {% if course.author != request.user and not paid and course.price %}