Django WSGI application ‘****.wsgi.application‘ could not be loaded; Error importing module.

在这里插入图片描述
django.core.exceptions.ImproperlyConfigured: WSGI application ‘day16.wsgi.application’ could not be loaded; Error importing module.
django核心配置异常:“day16.wsgi WSGI应用程序。应用程序’无法加载;错误导入模块。

解决方法

先看自己写的中间件文件引入MiddlewareMixin时是否正常

引用应该为:from django.utils.deprecation import MiddlewareMixin

再看settings.py文件中MIDDLEWARE里的配置是否都有逗号

你可能感兴趣的:(Django,django,python,中间件)