From 783ad1283add4d5b19c82272535e6fd02e443f18 Mon Sep 17 00:00:00 2001 From: erjemin Date: Sun, 22 Aug 2021 17:12:11 +0300 Subject: [PATCH] =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=B5?= =?UTF-8?q?=D1=82=20=D1=81=D1=87=D0=B5=D1=82=D1=87=D0=B8=D0=BA=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D1=81=D0=BC=D0=BE=D1=82=D1=80=D0=BE=D0=B2=20=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D0=BE=D1=81=D1=82=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cadpoint/web/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cadpoint/web/views.py b/cadpoint/web/views.py index 7839d8d..3c84edc 100644 --- a/cadpoint/web/views.py +++ b/cadpoint/web/views.py @@ -155,6 +155,8 @@ def show_item(request, to_template.update({"PAGE_OF_LIST": int(ppage)}) to_template.update({"ITEMS_AFTER": q_items_after}) to_template.update({"ITEMS_BEFORE": q_items_before}) + q_item.iContentHits += 1 + q_item.save(update_fields=["iContentHits"]) return render(request, template, to_template) except (ValueError, AttributeError, TbContent.DoesNotExist, TbContent.MultipleObjectsReturned): raise Http404("Контента с таким id не существует")