~netlandish/django-wiki

0aea07e7d59905341ac63e01672f4956b78ae021 — Benjamin Bach 6 years ago d3f4fc0 + 37c5f4a
Merge pull request #817 from rsalmaso/urls

Load wiki plugins on app ready
2 files changed, 2 insertions(+), 9 deletions(-)

M src/wiki/apps.py
M src/wiki/urls.py
M src/wiki/apps.py => src/wiki/apps.py +2 -0
@@ 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()

M src/wiki/urls.py => src/wiki/urls.py +0 -9
@@ 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




@@ 257,11 256,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()