Answer the question
In order to leave comments, you need to log in
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.
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "rivers.settings")
application = get_wsgi_application()
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',
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question