Django出现HTTP_HOST header: ‘testserver‘. You may need to add ‘testserver‘ to ALLOWED_HOSTS.

1、找到guest项目下的settings.py
Django出现HTTP_HOST header: ‘testserver‘. You may need to add ‘testserver‘ to ALLOWED_HOSTS._第1张图片添加host地址或者通配
ALLOWED_HOSTS = [‘127.0.0.1’,‘localhost’, ‘testserver’]或者ALLOWED_HOSTS = [’*’]

你可能感兴趣的:(Django,django)