mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
#7091: Simplify access to BASE_PATH variable
This commit is contained in:
@ -5,7 +5,7 @@
|
|||||||
<html
|
<html
|
||||||
lang="en"
|
lang="en"
|
||||||
data-netbox-path="{{ request.path }}"
|
data-netbox-path="{{ request.path }}"
|
||||||
data-netbox-base-path="{% base_path %}"
|
data-netbox-base-path="{{ settings.BASE_PATH }}"
|
||||||
{% if preferences|get_key:'ui.colormode' == 'dark'%}
|
{% if preferences|get_key:'ui.colormode' == 'dark'%}
|
||||||
data-netbox-color-mode="dark"
|
data-netbox-color-mode="dark"
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -355,14 +355,6 @@ def querystring(request, **kwargs):
|
|||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
||||||
@register.simple_tag()
|
|
||||||
def base_path():
|
|
||||||
"""
|
|
||||||
Access `BASE_PATH` in templates.
|
|
||||||
"""
|
|
||||||
return settings.BASE_PATH
|
|
||||||
|
|
||||||
|
|
||||||
@register.inclusion_tag('utilities/templatetags/utilization_graph.html')
|
@register.inclusion_tag('utilities/templatetags/utilization_graph.html')
|
||||||
def utilization_graph(utilization, warning_threshold=75, danger_threshold=90):
|
def utilization_graph(utilization, warning_threshold=75, danger_threshold=90):
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user