E
E
ekzotika2020-12-23 15:00:13
Django
ekzotika, 2020-12-23 15:00:13

What is causing the django.core.exceptions.ImproperlyConfigured error?

When runserver does not start the project and gives an error

django.core.exceptions.ImproperlyConfigured: WSGI application 'rivers.wsgi.application' could not be loaded; Error importing module.


wsgi.py

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "rivers.settings")

application = get_wsgi_application()


settings

INSTALLED_APPS = [

         'wtuser',
    'wtadmin',
    'wtutils',
    'vmcruises',
    'wtpages',
    'wtnews',
    'wtcontacts',
    'wtforms',
    'wtblocks',
    'wtrewrite',
    'whitelabel',
    # 'vendors',
    'wagtail.contrib.forms',
    'wagtail.contrib.redirects',
    'wagtail.embeds',
    'wagtail.sites',
    'wagtail.users',
    'wagtail.snippets',
    'wagtail.documents',
    'wagtail.images',
    'wagtail.search',
    'wagtail.admin',
    'wagtail.core',

    'wagtail.contrib.settings',
    'wagtail.contrib.modeladmin',

    'modelcluster',
    'taggit',
    'compressor',
    'mobileesp',
    #'wagtailtinymce',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'wagtail.contrib.sitemaps',
    'django.contrib.sitemaps',
    'django.contrib.sessions',
    #'django.contrib.sessions.backends.cached_db',

    'django.contrib.messages',
    'django.contrib.staticfiles',
    #'debug_toolbar',
    #'search',
    'wagtail.contrib.styleguide',

    'vmlog',
    # rest framework
    'vmapi_v1_0',
    'rest_framework',
    'rest_framework.authtoken',
    #'django_filters',
    #'coreapi',
    #'pygments',
    #'rest_framework_docs',
    'captcha',
    'clear_cache',
    'front',
    'webpack_loader',
]

MIDDLEWARE = [
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    # ~ 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'django.middleware.security.SecurityMiddleware',
    'wagtail.core.middleware.SiteMiddleware',
    'wagtail.contrib.redirects.middleware.RedirectMiddleware',
    'mobileesp.middleware.MobileDetectionMiddleware',
    'whitelabel.models.WhitelabeSettingsMiddleware',
    'vmcruises.views.DisableCSRF',
    'rivers.middleware.AppendSlash',
]


Tell me what could be the problem? I couldn't find an answer on the Internet, nothing helps.
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-12-23
@ekzotika

ModuleNotFoundError: No module named 'wagtail.core.middleware'
https://docs.wagtail.io/en/stable/releases/2.9.htm...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question