Server Error 500 Django Digital Ocean

Posted May 5, 2017 12.6k views

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

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.

Submit an Answer
2 answers

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:

by Justin Ellingwood
Django is a powerful web framework that can help you get your Python application or website off the ground. Django includes a simplified development server for testing your code locally, but for anything even slightly production related, a more secure and powerful web server...

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.