From 37c5f4a3d2846321d11acb877997ff540c36fb47 Mon Sep 17 00:00:00 2001 From: Raffaele Salmaso Date: Wed, 21 Feb 2018 21:58:02 +0100 Subject: [PATCH] Load wiki plugins on app ready --- src/wiki/apps.py | 2 ++ src/wiki/urls.py | 9 --------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/wiki/apps.py b/src/wiki/apps.py index aba8e911..94b5de0c 100644 --- a/src/wiki/apps.py +++ b/src/wiki/apps.py @@ -1,6 +1,7 @@ from django.apps import AppConfig from django.core.checks import register from django.utils.translation import gettext_lazy as _ +from wiki.core.plugins.loader import load_wiki_plugins from . import checks @@ -13,3 +14,4 @@ class WikiConfig(AppConfig): register(checks.check_for_required_installed_apps, checks.Tags.required_installed_apps) register(checks.check_for_obsolete_installed_apps, checks.Tags.obsolete_installed_apps) register(checks.check_for_context_processors, checks.Tags.context_processors) + load_wiki_plugins() diff --git a/src/wiki/urls.py b/src/wiki/urls.py index 65340337..b430a59f 100644 --- a/src/wiki/urls.py +++ b/src/wiki/urls.py @@ -2,7 +2,6 @@ from django.utils.module_loading import import_string from wiki.compat import include, url from wiki.conf import settings from wiki.core.plugins import registry -from wiki.core.plugins.loader import load_wiki_plugins from wiki.views import accounts, article, deleted_list @@ -259,11 +258,3 @@ def get_pattern(app_name="wiki", namespace="wiki", url_config_class=None): urlpatterns = url_config_class().get_urls() return urlpatterns, app_name, namespace - - -###################### -# PLUGINS -###################### - - -load_wiki_plugins() -- 2.45.2