2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 12:06:44 +00:00
Oliver dc9e25ebad Adds API endpoints for viewing and updating plugin settings
A lot of code updates / refactoring here to get this to work as expected
2022-01-04 20:27:35 +11:00

22 lines
614 B
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
from maintenance_mode.core import set_maintenance_mode
from plugin import plugin_registry
class PluginAppConfig(AppConfig):
name = 'plugin'
def ready(self):
if not plugin_registry.is_loading:
# this is the first startup
plugin_registry.collect_plugins()
plugin_registry.load_plugins()
# drop out of maintenance
# makes sure we did not have an error in reloading and maintenance is still active
set_maintenance_mode(False)