diff --git a/plinth/__main__.py b/plinth/__main__.py index 70f9e7580..84978bf0f 100644 --- a/plinth/__main__.py +++ b/plinth/__main__.py @@ -132,6 +132,7 @@ def main(): log.init() web_framework.init() + web_framework.post_init() logger.info('FreedomBox Service (Plinth) version - %s', __version__) for config_file in cfg.config_files: diff --git a/plinth/web_framework.py b/plinth/web_framework.py index b5f68e80d..6aa25cd28 100644 --- a/plinth/web_framework.py +++ b/plinth/web_framework.py @@ -53,6 +53,9 @@ def init(): logger.debug('Configured Django with applications - %s', settings.INSTALLED_APPS) + +def post_init(): + """Perform operations after completing init of other modules.""" logger.debug('Creating or adding new tables to data file') django.core.management.call_command('migrate', '--fake-initial', interactive=False, verbosity=0)