From d59ab69808dc37e61a7179cdc370a1fec48c7f49 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 19 Oct 2023 13:34:43 +0200 Subject: [PATCH] Allow explicit page suffix. --- fnp_django_pagination/__init__.py | 2 +- fnp_django_pagination/templatetags/pagination_tags.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fnp_django_pagination/__init__.py b/fnp_django_pagination/__init__.py index 1e68b19..be5cf9a 100644 --- a/fnp_django_pagination/__init__.py +++ b/fnp_django_pagination/__init__.py @@ -34,4 +34,4 @@ tools throughout a django application. """ -__version__ = (2, 2, 6, "final", 0) +__version__ = (2, 2, 7, "final", 0) diff --git a/fnp_django_pagination/templatetags/pagination_tags.py b/fnp_django_pagination/templatetags/pagination_tags.py index 015e19c..3d6a973 100644 --- a/fnp_django_pagination/templatetags/pagination_tags.py +++ b/fnp_django_pagination/templatetags/pagination_tags.py @@ -142,7 +142,9 @@ class AutoPaginateNode(Node): if self.multiple_paginations and 'multiple_paginations' not in context: context['multiple_paginations'] = True - if context.get('multiple_paginations') or getattr(context, "paginator", None): + if context.get('page_suffix'): + page_suffix = context['page_suffix'] + elif context.get('multiple_paginations') or getattr(context, "paginator", None): page_suffix = '_%s' % self.queryset_var else: page_suffix = '' -- 2.20.1