[Answer]-Server Error (500) in accessing a section in Django app

1👍

Just a small bug, but if this fixed it I’ll take the answer 🙂 :
You have return HttpRespones instead of return HttpResponse in the buggy method. By the way, if you’re using a “live” server instead of the Django toy one, you should see a SyntaxError in the logs, e.g. at /var/log/apache2/error_log on a Mac.

👤xnx

0👍

You set DEBUG to False in settings.py but you didn’t change the ALLOWED_HOSTS variable to include your domain name. As a security measure, whenever you’ve turned off debugging you must explicitly state which domain name(s) the app is allowed to be called from.

ALLOWED_HOSTS = [‘yourdomainname.com’]

Leave a comment