Style fixes

This commit is contained in:
Oliver Walters 2021-05-14 12:40:42 +10:00
parent f76bc5a7b8
commit 7deea1ec00

View File

@ -5,7 +5,6 @@ over and above the built-in Django tags.
"""
import os
import django
from django.utils.translation import ugettext_lazy as _
from django.conf import settings as djangosettings
@ -74,12 +73,14 @@ def part_allocation_count(build, part, *args, **kwargs):
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_db_engine(*args, **kwargs):
""" Return the InvenTree database backend e.g. 'postgresql' """
@ -92,6 +93,7 @@ def inventree_db_engine(*args, **kwargs):
return engine
@register.simple_tag()
def inventree_instance_name(*args, **kwargs):
""" Return the InstanceName associated with the current database """