Django is not loading the statics in production
I have the project, it runs fine locally, I can do the deployment, but when I try to enter all the CSS, not even the images appear, absolutely nothing and in the console I get a 404 error for the images
3 Replies
Please provide your project ID or reply with
N/A
. Thread will automatically be closed if no reply is received within 10 minutes. You can copy your project's id by pressing Ctrl/Cmd + K -> Copy Project ID.The best way to get your static files for Django to work with railway is to utilize the whitenoise module. You would use the whitenoise module in situations like Heroku and Railway. Additionally, you can look at https://github.com/railwayapp-templates/django for all the configurations you need for whitenoise to make your assets serve.
⚠️ experimental feature
No project ID was provided. Closing thread.