Forums

HTTP 400

I've just started getting HTTP 400 on my site for some reason. I don't think I broke it. Was working fine. I did a south migration and added admin.py to my app folder.

The requests are hitting the server and access logs, but not the error logs.

Did I break it or did something go horribly horribly wrong?


edit: I changed the wsgi to point at my backup folder and it works. The hell happened?! Something in the south migration maybe? All I did was add some fields to a model.


edit 2: yep. it was my fault. I had forgetten to turn debug back on. Have to turn it off to make south work in 1.6/py3.3 and forget to switch back.

Glad you figured it out!

I did end up getting it figured out, but I have a concern as to how that would be handled once I am ready to go live. Clearly there is some setting causing it to 400 out on every request. Do I need to populate allowed hosts or something?

Yup, that's exactly right. The ALLOWED_HOSTS list is ignored in debug mode, but if it's not populated then you'll get a a 400 error for every request.

Then is there a list or specific ip/hostname that I should be using for PA?

ALLOWED_HOSTS should contain the domain name of your site...

/facepalm Iguess that what a read-the-docs type question huh?

Thanks.

:)