Renamed the variable in the url_period template tag in the Mia core application.

This commit is contained in:
依瑪貓 2020-07-17 23:06:10 +08:00
parent 856bcd47ff
commit 0525197993

View File

@ -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