From b24368211381f021f3617459206ca804d0b1f5ec Mon Sep 17 00:00:00 2001 From: Bryan Brancotte <bryan.brancotte@pasteur.fr> Date: Mon, 22 Feb 2021 16:14:19 +0100 Subject: [PATCH] bugfix when raw path provided --- basetheme_bootstrap/templatetags/basetheme_bootstrap.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/basetheme_bootstrap/templatetags/basetheme_bootstrap.py b/basetheme_bootstrap/templatetags/basetheme_bootstrap.py index 49af35d..cab7c3a 100644 --- a/basetheme_bootstrap/templatetags/basetheme_bootstrap.py +++ b/basetheme_bootstrap/templatetags/basetheme_bootstrap.py @@ -17,8 +17,8 @@ logger = logging.getLogger(__name__) @register.filter def is_active_or_desc(request, pattern): try: - if str(request.path).startswith(str(reverse(pattern))) \ - or str(request.path).startswith(str(pattern)): + if str(request.path).startswith(str(pattern)) \ + or str(request.path).startswith(str(reverse(pattern))): return 'active ' except Exception: pass diff --git a/setup.py b/setup.py index a5e2956..5abd4c7 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ readme = open('README.rst').read() setup( name='django-basetheme-bootstrap', - version='0.2.56', + version='0.2.57', description='Django Basetheme Bootstrap', long_description=readme, author='Bryan Brancotte', -- GitLab