Added namespace to the url_period tag in the Mia core application.

This commit is contained in:
依瑪貓 2020-08-17 22:51:47 +08:00
parent 24db1af175
commit 062f4422d1

View File

@ -68,7 +68,8 @@ def url_period(context: RequestContext, period_spec: str) -> str:
context.request.resolver_match.url_name)
kwargs = context.request.resolver_match.kwargs.copy()
kwargs["period"] = period_spec
return reverse(view_name, kwargs=kwargs)
namespace = context.request.resolver_match.namespace
return reverse(view_name, kwargs=kwargs, current_app=namespace)
@register.simple_tag(takes_context=True)