roverdotcom/django-inlinecss

Cannot use variables in file path in tag

Opened this issue · 0 comments

I can do this:

{% load static inlinecss %}
{% inlinecss "/css/mycssfile.css" %}

But I need to pass a variable instead of a string.

It won't let me pass it with the context (I get "invalid file: None" error):

{% load static inlinecss %}
{% inlinecss a_context_variable %}

I've tried various other things too:

https://stackoverflow.com/questions/44514339/django-template-use-inlinecss-with-variable