L
17

My first Django app crashed on deployment and I panicked for 2 hours

I built a simple blog app following a tutorial, but when I pushed it to Heroku, it just showed a blank white page. Turns out I forgot to set DEBUG=False and add allowed hosts. Has anyone else had a deployment fail over something this silly?
3 comments

Log in to join the discussion

Log In
3 Comments
james_ross
james_ross1mo ago
And the best part is even after you fix DEBUG and allowed hosts, you still find another dumb thing later... like forgetting to set the secret key properly in production or having static files not load because you didn't run collectstatic. Every deployment feels like you're just one small config away from disaster honestly. I had one where my database migrations were saved wrong so the users table wouldn't create and I spent an hour thinking it was a Postgres issue when really I just typed the model name wrong in a migration file. It's always something tiny that makes you feel like you've never coded before.
6
faith12
faith121mo ago
Nah man you're not alone, that exact same thing got me on my first real project too. I spent a solid afternoon staring at a white screen thinking my whole app was broken. Finally noticed DEBUG was still on and the allowed hosts were empty. Felt like such a clown when I realized it was just two lines in settings. Welcome to the club.
4
hall.quinn
hall.quinn14d ago
Three hours and fifty two minutes I will never get back, all because Django wanted to be polite about my empty allowed hosts list instead of just yelling at me. Pretty sure half my Django career has been debugging problems that would have been avoided if the error messages just said "hey idiot, you forgot this one thing" instead of showing a blank white page. At this point I just assume any weird behavior is something stupid I did in settings.py before even checking the code.
2