Remove stat context variables

This commit is contained in:
Oliver Walters 2022-04-28 01:20:36 +10:00
parent ae81f50ee5
commit 0989c308d0

View File

@ -882,29 +882,6 @@ class DatabaseStatsView(AjaxView):
ajax_template_name = "stats.html"
ajax_form_title = _("System Information")
def get_context_data(self, **kwargs):
ctx = {}
# Part stats
ctx['part_count'] = Part.objects.count()
ctx['part_cat_count'] = PartCategory.objects.count()
# Stock stats
ctx['stock_item_count'] = StockItem.objects.count()
ctx['stock_loc_count'] = StockLocation.objects.count()
"""
TODO: Other ideas for database metrics
- "Popular" parts (used to make other parts?)
- Most ordered part
- Most sold part
- etc etc etc
"""
return ctx
class NotificationsView(TemplateView):
""" View for showing notifications