mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 03:26:45 +00:00
Cleanup tags (#8712)
* Remove part_allocation_count tag * Remove more dead tags
This commit is contained in:
parent
e37e72357a
commit
88bfb23362
@ -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 <part> allocated to <build>."""
|
||||
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."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user