jschneier / django-storages

https://django-storages.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
2.74k stars 859 forks source link

Fixing the problem that arises when using --clear in python manage.py collectstatic #1403

Closed Frodothedwarf closed 4 months ago

Frodothedwarf commented 4 months ago

There is a ongoing issue with python manage.py collectstatic --clear

Due to Django trying to walk through every dir we just return all the files from the top dir. That way we don't get a error when Django is trying to walk the files.

Tested with --clear and without --clear.

Frodothedwarf commented 4 months ago

@jschneier can you please look into this pr?

Frodothedwarf commented 4 months ago

Changes has been implemented, and tests has been updated @jschneier

Frodothedwarf commented 4 months ago

@jschneier workflow failed, whitespaced fixed. https://github.com/jschneier/django-storages/pull/1403/commits/c8bb98e64c3e7627e7f65fc2a61f128bbbd60d20