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
9 Replies
Percy
Percy2y ago
Project ID: 34fb2394-310d-4f6f-a509-c7db6d7435f4
Percy
Percy2y ago
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. Vincenzo's modified template here https://github.com/railwayapp-templates/django is a wonderful example of that.
⚠️ experimental feature
Bfixed
BfixedOP2y ago
34fb2394-310d-4f6f-a509-c7db6d7435f4
Brody
Brody2y ago
take a look at how https://github.com/railwayapp-templates/django serves static images
Bfixed
BfixedOP2y ago
Yeah, thanks, already did it, but I needed more things for the app to run with the ccs
Bfixed
BfixedOP2y ago
Bfixed
BfixedOP2y ago
This in INSTALLED APPS "whitenoise.runserver_nostatic", "django.contrib.staticfiles", and the other that it is in the github that you send me
Brody
Brody2y ago
cool
Bfixed
BfixedOP2y ago
Thanks for the help 😄
Want results from more Discord servers?
Add your server