我在随机时间不断收到此错误,每当我触摸 django.wsgi 文件时,它都会得到修复,仅在几个小时后再次发生。我不知道该怎么做。我的 middleware_classes 如下:
MIDDLEWARE_CLASSES = (
'django.middleware.cache.UpdateCacheMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.csrf.CsrfResponseMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.facebookConnectMiddleware.FacebookConnectMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
)
当我执行“if request.session”语句时,错误总是发生在 facebook 中间件中。谢谢