django-easy-pdf
django-easy-pdf copied to clipboard
Use staticfiles finders for fetch_resources
In my app, the existing implementation of fetch_resources only worked if collectstatic had been run. Using Django's staticfiles.finders.find() is more flexible for different staticfiles configurations.
N.B. staticfiles finders are currently a "private interface," but given that the task here is to resolve static file URLs into absolute paths, this seems like a very appropriate use.
https://docs.djangoproject.com/en/1.6/ref/settings/#staticfiles-finders
Thanks for pointing this out. This makes a lot of sense in case collected static files are not available on the app server. I still consider if the STATIC_ROOT
should be checked before calling finders.find
.