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

Doesn't work with staticfiles finders, raises error when STATIC_ROOT is not set #103

Open
Gwildor opened this issue Feb 18, 2016 · 4 comments · May be fixed by #126
Open

Doesn't work with staticfiles finders, raises error when STATIC_ROOT is not set #103

Gwildor opened this issue Feb 18, 2016 · 4 comments · May be fixed by #126

Comments

@Gwildor
Copy link

Gwildor commented Feb 18, 2016

Pretty self-explanatory. #22, #52 and #64 are related. If you're using staticfiles with the STATICFILES_DIRS setting, but are not using STATIC_ROOT, an error is raised when trying to make absolute paths for the static files. In our case, we use staticfiles in development and use a separate storage class for S3 storage of our static files. This means STATIC_ROOT is never set for us, neither in development nor in production. But, because of the has_scheme check in make_absolute_paths this luckily shouldn't be a problem in production, only in development.

@johnraz
Copy link
Collaborator

johnraz commented May 18, 2016

@Gwildor could you come up with a failing test case maybe?

@rmallermartins
Copy link

Same problem here, have you came up with any solution @Gwildor?

@Gwildor
Copy link
Author

Gwildor commented Oct 26, 2016

My solution was to simply leave wkhtmltopdf out of INSTALLED_APPS and use the views I needed directly in my views.py module. Worked fine that way.

@amirkdv
Copy link
Contributor

amirkdv commented Feb 8, 2019

I ran into a similar issue while making our local dev environments work (running in debug mode with runserver). I came up with a workaround that works that I have noted in #165: #165 (comment)

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 a pull request may close this issue.

4 participants