Revised the url_period template tag so that it works with or without the subject code in the mia_core application.
This commit is contained in:
parent
f33a1631fa
commit
856bcd47ff
@ -85,8 +85,9 @@ def url_period(context, period_spec):
|
||||
viewname = "%s:%s" % (
|
||||
request.resolver_match.app_name,
|
||||
request.resolver_match.url_name)
|
||||
subject_code = request.resolver_match.kwargs["subject_code"]
|
||||
return reverse(viewname, args=[subject_code, period_spec])
|
||||
kwargs = request.resolver_match.kwargs
|
||||
kwargs["period_spec"] = period_spec
|
||||
return reverse(viewname, kwargs=kwargs)
|
||||
|
||||
|
||||
@register.filter
|
||||
|
Loading…
Reference in New Issue
Block a user