@register.inclusion_tag('utilities/templatetags/utilization_graph.html')
def utilization_graph(utilization, warning_threshold=75, danger_threshold=90):
 return {'utilization': utilization, 'warning_threshold': warning_threshold, 'danger_threshold': danger_threshold}

@ register . inclusion_tag ( 'utilities/templatetags/utilization_graph.html' ) def utilization_graph ( utilization , warning_threshold = 75 , danger_threshold = 90 ) : return { 'utilization' : utilization , 'warning_threshold' : warning_threshold , 'danger_threshold' : danger_threshold }
display a horizontal bar graph indicating a percentage of utilization .