-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to purge thumbnails (and other static files) with whitenoise? #92
Comments
@enoren5 brother follow the steps: To delete the duplicate or hashed files, we can remove them by running the command.python manage.py collectstatic --noinput --clear --no-post-process
|
Thanks, Umar! Sounds great. Here is some output from my shell:
The command proceeds to delete all of my static files. I'm not sure how to test this because as you can see the 'Database Config' indicates db.sqlite3 instead of Postgres. So it appears that in order to determine if the command you suggest to correct this static file issue #92, first we need to continue to resolve Issue #83. Thanks for your hardwork so far, @UmarGit. |
hmm @enoren5, okay brother let me check |
I initially believed that the problem was with static files (thumbnails) hosted in the cloud via S3. But actually the problem (and solution) involves purging tarot key thumbnails locally - - if you can believe that! First navigate to Thanks @UmarGit. You have resolved the Issue described originally. |
I’m re-opening this issue because other static files are still not loading properly. This time the problem file is with the
https://forum.djangoproject.com/t/tracking-two-static-file-directories-or-just-one/7732 |
When adding a thumbnail for a generator, K0.jpg (“The Fool”) and K21.jpg (“The World”) are getting renamed with a small hash appended to the end which causes Django to serve an empty thumbnail. I understand that the reason why is because inside the
/static/img/thumbnails
directory there is a duplicate thumbnail already named K0.jpg and K21.jpg. . The solution locally is to manually enter the thumbnails directory and delete all the duplicate K0.jpg and K21.jpg’s (including the ones with the hashes) and then locate the generator inside the Admin Dashboard and re-upload it. However in production on Heroku in the cloud, the static directory is delegated out to whitenoise which is a wrapper to integrate static files hosted on AWS. So I can’t selectively delete static files.In the context of Heroku and AWS, how do I manually remove duplicate thumbnail static files?
The text was updated successfully, but these errors were encountered: