其他分享
首页 > 其他分享> > django启动报错

django启动报错

作者:互联网

学习django第一天,第一次启动服务就报错,报错内容如下:

DisallowedHost at /

Invalid HTTP_HOST header: '192.168.116.22:8000'. You may need to add '192.168.116.22' to ALLOWED_HOSTS.

 

 针对此问题,去setting.py配置文件里查看发现:ALLOWED_HOSTS = []

修改为*后,可以正常访问:ALLOWED_HOSTS = ['*']

 

标签:启动,116.22,192.168,django,HOSTS,ALLOWED,报错
来源: https://www.cnblogs.com/santia-god/p/16350898.html