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 of static files is inconsistent #50

Open
typonaut opened this issue Mar 19, 2020 · 3 comments
Open

use of static files is inconsistent #50

typonaut opened this issue Mar 19, 2020 · 3 comments

Comments

@typonaut
Copy link

When loading a CSS file inlinecss appears to only look within the static directory within the web root, ie:

{% inlinecss "account/css/Email-Styles.css" %}

is only "seen" here:

/webroot/static/account/css/Email-Styles.css

or as an OS path:

/Library/Webserver/Documents/static/account/css/Email-Styles.css

However the static will find the files elsewhere, for example, in the static directories of loaded apps:

/Library/Webserver/Documents/mydemoapp/static/account/css/Email-Styles.css

and such files are served as a web request:

http://127.0.0.1:8080/static/account/css/Email-Styles.css

But inlinecss will not load files from the static directory of installed_apps.

@huygens545
Copy link

This pull requests fixes the bug: #53

@toniengelhardt
Copy link

Adding this line to settings file solved it for me:

INLINECSS_CSS_LOADER = 'django_inlinecss.css_loaders.StaticfilesFinderCSSLoader'

@andyhasit
Copy link

@toniengelhardt thanks, that solved my issue, but we shouldn't have to do that...

Also hi! Fancy seeing you here :-D

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

No branches or pull requests

4 participants