我正在尝试使用./manage.py runserver运行django服务器
但出现此错误:
Invalid HTTP_HOST header: '127.0.0.1:8000'. You may need to add '127.0.0.1' to ALLOWED_HOSTS.
请帮我.
就这样做吧
myapp |______myapp |______settings.py
里面应该有一条线:
ALLOWED_HOSTS = []
改为做
ALLOWED_HOSTS = ["127.0.0.1"]