2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 13:35:40 +00:00

Only load plugins if PLUGINS_ENABLED is true

- Hide plugin settings
- Add plugin support status to "stats" dialog
This commit is contained in:
Oliver
2022-01-11 13:39:47 +11:00
parent 31df4eae83
commit 8aec055e6c
7 changed files with 68 additions and 15 deletions

View File

@ -7,6 +7,7 @@ over and above the built-in Django tags.
import os
import sys
import django
from django.utils.html import format_html
from django.utils.translation import ugettext_lazy as _
@ -107,6 +108,13 @@ def inventree_docker_mode(*args, **kwargs):
return djangosettings.DOCKER
@register.simple_tag()
def plugins_enabled(*args, **kwargs):
""" Return True if plugins are enabled for the server instance """
return djangosettings.PLUGINS_ENABLED
@register.simple_tag()
def inventree_db_engine(*args, **kwargs):
""" Return the InvenTree database backend e.g. 'postgresql' """