mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-06 23:38:48 +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 os
|
||||||
import django
|
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from django.conf import settings as djangosettings
|
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))
|
return InvenTree.helpers.decimal2string(build.getAllocatedQuantity(part))
|
||||||
|
|
||||||
|
|
||||||
@register.simple_tag()
|
@register.simple_tag()
|
||||||
def inventree_in_debug_mode(*args, **kwargs):
|
def inventree_in_debug_mode(*args, **kwargs):
|
||||||
""" Return True if the server is running in DEBUG mode """
|
""" Return True if the server is running in DEBUG mode """
|
||||||
|
|
||||||
return djangosettings.DEBUG
|
return djangosettings.DEBUG
|
||||||
|
|
||||||
|
|
||||||
@register.simple_tag()
|
@register.simple_tag()
|
||||||
def inventree_db_engine(*args, **kwargs):
|
def inventree_db_engine(*args, **kwargs):
|
||||||
""" Return the InvenTree database backend e.g. 'postgresql' """
|
""" Return the InvenTree database backend e.g. 'postgresql' """
|
||||||
@ -92,6 +93,7 @@ def inventree_db_engine(*args, **kwargs):
|
|||||||
|
|
||||||
return engine
|
return engine
|
||||||
|
|
||||||
|
|
||||||
@register.simple_tag()
|
@register.simple_tag()
|
||||||
def inventree_instance_name(*args, **kwargs):
|
def inventree_instance_name(*args, **kwargs):
|
||||||
""" Return the InstanceName associated with the current database """
|
""" Return the InstanceName associated with the current database """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user