手记

DisallowedHost at出现这样的错误

DisallowedHost at /
Invalid HTTP_HOST header: '10.128.28.186:8000'. You may need to add u'10.128.28.186' to ALLOWED_HOSTS.
Request Method: GET
Request URL: http://10.128.28.186:8000/
Django Version: 1.11.4
Exception Type: DisallowedHost
Exception Value:
Invalid HTTP_HOST header: '10.128.28.186:8000'. You may need to add u'10.128.28.186' to ALLOWED_HOSTS.
Exception Location: C:\Users\Administrator\Envs\testvir2\lib\site-packages\django\http\request.py in get_host, line 113
Python Executable: C:\Users\Administrator\Envs\testvir2\Scripts\python.exe
Python Version: 2.7.13
Python Path:
['C:\Users\Administrator\PycharmProjects\test2',
'C:\Users\Administrator\PycharmProjects\test2',
'C:\Windows\system32\python27.zip',
'C:\Users\Administrator\Envs\testvir2\DLLs',
'C:\Users\Administrator\Envs\testvir2\lib',
'C:\Users\Administrator\Envs\testvir2\lib\plat-win',
'C:\Users\Administrator\Envs\testvir2\lib\lib-tk',
'C:\Users\Administrator\Envs\testvir2\Scripts',
'c:\python27\Lib',
'c:\python27\DLLs',
'c:\python27\Lib\lib-tk',
'C:\Users\Administrator\Envs\testvir2',
'C:\Users\Administrator\Envs\testvir2\lib\site-packages']
Server time: Mon, 28 Aug 2017 23:26:53 +0000

0人推荐
随时随地看视频
慕课网APP