Просмотр исходного кода

#7091: Simplify access to BASE_PATH variable

jeremystretch 4 лет назад
Родитель
Сommit
f63dcb1f08
2 измененных файлов с 1 добавлено и 9 удалено
  1. 1 1
      netbox/templates/base/base.html
  2. 0 8
      netbox/utilities/templatetags/helpers.py

+ 1 - 1
netbox/templates/base/base.html

@@ -5,7 +5,7 @@
 <html
   lang="en"
   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'%}
     data-netbox-color-mode="dark"
   {% else %}

+ 0 - 8
netbox/utilities/templatetags/helpers.py

@@ -355,14 +355,6 @@ def querystring(request, **kwargs):
         return ''
 
 
-@register.simple_tag()
-def base_path():
-    """
-    Access `BASE_PATH` in templates.
-    """
-    return settings.BASE_PATH
-
-
 @register.inclusion_tag('utilities/templatetags/utilization_graph.html')
 def utilization_graph(utilization, warning_threshold=75, danger_threshold=90):
     """