From 46e099c74f7a642c76c55e93e04fce124ae11865 Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Wed, 7 Mar 2018 15:46:17 +0300 Subject: [PATCH] Block the purchase of the course where the author is the user himself --- apps/course/templates/course/course.html | 4 ++-- apps/payment/views.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/course/templates/course/course.html b/apps/course/templates/course/course.html index 0d789b81..848b31b7 100644 --- a/apps/course/templates/course/course.html +++ b/apps/course/templates/course/course.html @@ -25,7 +25,7 @@
Вернуться
- {% if not paid and course.price %} + {% if course.author != request.user not paid and course.price %} {% endif %} - {% if not paid and course.price %} + {% if course.author != request.user not paid and course.price %}