1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Flip the order of tag and URL name for the tag template tag

This commit is contained in:
Jeremy Stretch
2018-07-05 15:20:13 -04:00
parent 9eb9715e05
commit edf53d4516
17 changed files with 23 additions and 19 deletions

View File

@@ -171,11 +171,11 @@ def utilization_graph(utilization, warning_threshold=75, danger_threshold=90):
@register.inclusion_tag('utilities/templatetags/tag.html')
def tag(url_name, tag):
def tag(tag, url_name=None):
"""
Display a link to the given object list filtered by a specific Tag slug.
Display a tag, optionally linked to a filtered list of objects.
"""
return {
'url_name': url_name,
'tag': tag,
'url_name': url_name,
}