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:
@ -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' """
|
||||
|
Reference in New Issue
Block a user