All the views in django application with static content are giving 500 error

Hi,
I have deployed a django application. Deployment was successful. All the urls are working except those with static content in it. I have followed django deployment tutorial.
URL with static content: https://resybot-22sv.onrender.com/search
URL without static content: Document
Tried all the support online and forums as well. Please advise what I am doing wrong.

Hi there,

How are you hosting your static content?

Did you follow the instructions here to configure a service to server static files: https://render.com/docs/deploy-django#static-files?

Regards,

Matt

Yes, Matt. I followed the instructions but it didnt work. I found a similar issue here where the proposed solution was to set Debug=True and that did the trick. I am sure it should not be the case in prod env but it was not working otherwise. I found that many people on render platform have come across similar situations may be its something you guys can consider about platform.

you don’t want to enable debug in a publically accessable server,

ie: i can go to this link and see all your secrets :slight_smile:

static content relies on “collectstatic” management command, this would need to be part of your build command step, or etc.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.