From 0525197993292d75e0ab71884534ab5001b9c3c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Fri, 17 Jul 2020 23:06:10 +0800 Subject: [PATCH] Renamed the variable in the url_period template tag in the Mia core application. --- mia_core/templatetags/mia_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mia_core/templatetags/mia_core.py b/mia_core/templatetags/mia_core.py index 1953f4e..a9b3e25 100644 --- a/mia_core/templatetags/mia_core.py +++ b/mia_core/templatetags/mia_core.py @@ -82,12 +82,12 @@ def url_query(url, **kwargs): @register.simple_tag(takes_context=True) def url_period(context, period_spec): request = context["request"] - viewname = "%s:%s" % ( + view_name = "%s:%s" % ( request.resolver_match.app_name, request.resolver_match.url_name) kwargs = request.resolver_match.kwargs kwargs["period_spec"] = period_spec - return reverse(viewname, kwargs=kwargs) + return reverse(view_name, kwargs=kwargs) @register.filter