diff --git a/django_inlinecss/templatetags/inlinecss.py b/django_inlinecss/templatetags/inlinecss.py index c778ddf..8b9268b 100644 --- a/django_inlinecss/templatetags/inlinecss.py +++ b/django_inlinecss/templatetags/inlinecss.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals from django import template +from django.contrib.staticfiles.finders import find from django.utils.encoding import smart_text from django_inlinecss import conf @@ -25,8 +26,7 @@ def render(self, context): if path is not None: path = smart_text(path) - css_loader = conf.get_css_loader()() - css = ''.join((css, css_loader.load(path))) + css = ''.join((css, find(path))) engine = conf.get_engine()(html=rendered_contents, css=css) return engine.render()