mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Style fixes
This commit is contained in:
parent
f76bc5a7b8
commit
7deea1ec00
@ -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 """
|
||||
|
Loading…
Reference in New Issue
Block a user