django 1.5 update ALLOWED_HOSTS failing SuspiciousOperation

Mat*_*hew 5 python django django-1.5

I have updated to django 1.5 and am getting the following message:

SuspiciousOperation: Invalid HTTP_HOST header (you may need to set ALLOWED_HOSTS): localhost:8000

I have tried localhost, 127.0.0.1, localhost:8000 in ALLOWED_HOSTS. I have also tried ['*'] all without success.

Anybody any ideas where I am going wrong? Works as expected with DEBUG=False

Mat*_*hew 0

解决。我在另一个文件中部署了设置,覆盖了 settings.py 中的 allowed_hosts 。抱歉在发布之前错过了这一点。感谢您收到的回复。