标签:sel pre prevent cat oca line and hand port
Last Update : 10/22/2016 19时18分
运行python manage.py runserver时出现下面错误
Traceback (most recent call last):
File "D:\Python27\lib\wsgiref\handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "D:\Python27\lib\site-packages\django\contrib\staticfiles\handlers.py", line 72, in __call__
return self.application(environ, start_response)
File "D:\Python27\lib\site-packages\django\core\handlers\wsgi.py", line 236, in __call__
File "D:\Python27\lib\site-packages\django\core\handlers\base.py", line 57, in load_middleware
SessionAuthenticationMiddleware 这个是1.7里新加的,把 django版本升级就可以解决这个问题
还有一个方法是在 settings.py里删除SessionAuthenticationMiddleware
‘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‘,
D:\virtualenv\lwc-ws>pip install django==1.8
C:\Python27\lib\site-packages\pip-8.1.1-py2.7.egg\pip\_vendor\requests\packages
urllib3\util\ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but
the SNI (Subject Name Indication) extension to TLS is not available on this pla
tform. This may cause the server to present an incorrect TLS certificate, which
SNIMissingWarning
C:\Python27\lib\site-packages\pip-8.1.1-py2.7.egg\pip\_vendor\requests\packages
urllib3\util\ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is n
ot available. This prevents urllib3 from configuring SSL appropriately and may c
ause certain SSL connections to fail. For more information, see https://urllib3.
readthedocs.org/en/latest/security.html#insecureplatformwarning.
pip install pyopenssl ndg-httpsclient pyasn1
No matching distribution found for djangocms-installer
Starting new HTTPS connection (1): pypi.python.org
https://docs.djangoproject.com/en/1.8/ref/settings/
标签:sel pre prevent cat oca line and hand port
原文地址:http://www.cnblogs.com/2dogslife/p/5988201.html