I have Django app and Nginx serving static files. I’ve transferred a static file to my server on droplet and restarted Nginx. I also restarted Gunicorn. I even rebooted my server – and I cannot seem to update the static file on the production-side. It works on my development server just fine. I’ve run python manage.py collectstatic and python manage.py runserver. Still no update of static file. It’s a .png file. Any ideas would be much appreciated.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This comment has been deleted
Heya,
Here’s a few steps you might want to try:
If you’re still having issues, you might want to look at your Nginx and Gunicorn configurations. Please note that your static assets should be handled by Nginx and not Gunicorn.
To help you understand better, you can refer to this How To Set Up Django with Postgres, Nginx, and Gunicorn on Ubuntu 22.04.
Hope that this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.