2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-20 22:06:28 +00:00

docker-mode switch in settings and tags

This commit is contained in:
2021-05-16 18:19:35 +02:00
parent 16b7d6c34d
commit b2a912c770
3 changed files with 13 additions and 0 deletions

View File

@ -81,6 +81,13 @@ def inventree_in_debug_mode(*args, **kwargs):
return djangosettings.DEBUG
@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 inventree_db_engine(*args, **kwargs):
""" Return the InvenTree database backend e.g. 'postgresql' """