Skip to content
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

Use staticfiles finders for fetch_resources #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

steinbro
Copy link

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.

@steinbro
Copy link
Author

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

@nigma
Copy link
Owner

nigma commented May 15, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants