Server Error 500 Django Digital Ocean

i’ve deployed my django project in digital ocean, I’m getting Server Error(500), however the url is showing me “myipaddress/accounts/login/?next=/” . I could n’t figure out what is causing error. I’ve kept DEBUG=False even in


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I have a similar problem. when loggedin i and try to access a page, i get the server error(500) on the browser. but when looged out i get no such massage and can access the page. however images uploaded through the admin site would’t display and won’t even open if i try viewing them the the said admin site. please someone help.

Sorry to see that your question hasn’t received an answer yet. Unfortunately, after this much time, it is unlikely an answer for this specific question will be provided without more information. For people still landing here via search, here’s one tip that might point you in the right direction when degugging.

Beginning with Django 1.5 a new “allowed hosts” setting was introduced. When DEBUG is set to False, it is enforced. In your file, find the that looks like:


and change it to include the Droplet’s IP address and/or the domain name pointing to your site. For example:

ALLOWED_HOSTS = ["", ""]

Also, check out this tutorial for full step-by-step instructions for getting a Django site up and running: