From 88bfb23362e80be571100f54eb4838f58d20335b Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 19 Dec 2024 07:33:48 +1100 Subject: [PATCH] Cleanup tags (#8712) * Remove part_allocation_count tag * Remove more dead tags --- .../templatetags/inventree_extras.py | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/src/backend/InvenTree/InvenTree/templatetags/inventree_extras.py b/src/backend/InvenTree/InvenTree/templatetags/inventree_extras.py index 81d9b483ef06..f0ab013d9419 100644 --- a/src/backend/InvenTree/InvenTree/templatetags/inventree_extras.py +++ b/src/backend/InvenTree/InvenTree/templatetags/inventree_extras.py @@ -118,35 +118,6 @@ def to_list(*args): return args -@register.simple_tag() -def part_allocation_count(build, part, *args, **kwargs): - """Return the total number of allocated to .""" - return InvenTree.helpers.decimal2string(build.getAllocatedQuantity(part)) - - -@register.simple_tag() -def inventree_in_debug_mode(*args, **kwargs): - """Return True if the server is running in DEBUG mode.""" - return djangosettings.DEBUG - - -@register.simple_tag() -def inventree_show_about(user, *args, **kwargs): - """Return True if the about modal should be shown.""" - if get_global_setting('INVENTREE_RESTRICT_ABOUT'): - # Return False if the user is not a superuser, or no user information is provided - if not user or not user.is_superuser: - return False - - return True - - -@register.simple_tag() -def inventree_docker_mode(*args, **kwargs): - """Return True if the server is running as a Docker image.""" - return djangosettings.DOCKER - - @register.simple_tag() def plugins_enabled(*args, **kwargs): """Return True if plugins are enabled for the server instance."""