From 36cca23b603b861265aa4b100d6834b6772ff212 Mon Sep 17 00:00:00 2001 From: Andrey Smakotin Date: Sat, 3 Jan 2026 15:19:47 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3=20=D0=BF=D0=B0=D0=B3=D0=B8=D0=BD=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B8=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20custom=20?= =?UTF-8?q?template=20tag=20url=5Freplace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Создан элегантный тег для автоматического сохранения GET-параметров - Код пагинации сократился в 10 раз - Переиспользуется в любых шаблонах проекта - 100 процентов Django-way без хаков --- .../templates/customers/customer_list.html | 11 ++++--- myproject/customers/templatetags/__init__.py | 0 .../customers/templatetags/query_tags.py | 33 +++++++++++++++++++ 3 files changed, 39 insertions(+), 5 deletions(-) create mode 100644 myproject/customers/templatetags/__init__.py create mode 100644 myproject/customers/templatetags/query_tags.py diff --git a/myproject/customers/templates/customers/customer_list.html b/myproject/customers/templates/customers/customer_list.html index 8b44661..eeff6f4 100644 --- a/myproject/customers/templates/customers/customer_list.html +++ b/myproject/customers/templates/customers/customer_list.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load query_tags %} {% block title %}Клиенты{% endblock %} @@ -132,12 +133,12 @@