简体   繁体   中英

Static File Hosting, WhiteNoise not Updating - Django

I have a Django website in production and a while back I successfully hosted my static files using Whitenoise so I could use them in production. Now a few months later I want to add a new.png along with a bunch of other code and push it to production. I added the.png I wanted into my static files then deleted my 'staticfiles' folder in my code and reran python manage.py collectstatic . The files all collected like normal but when I ran my local server the page is no longer hosting that new.png using whitenoise. All the other static files that were hosting successfully before are STILL hosting fine now and being hosted by whitenoise. Its just the new one that is not being hosted through whitenoise. I checked the 'static files' folder and the new.png is in there fine with a copy of itself and additional characters added to its name like whitenoise usually does and like how all the other files are that are being successfully hosted.

How do I update/refresh Whitenoise to acknowledge a new static file added?

Thanks!

I figured it out. I had the file named ".PNG" and it needed to be ".png". Small mistake but I finally tracked it down.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM