I'm using Django-Compressor with Jinja 2. It all works fine with django-jinja using Compressor's extension, until I try to do Offline Compression.
Compressor needs a setting (COMPRESS_JINJA2_GET_ENVIRONMENT) to be set to a function that returns the jinja2 environment.
I couldn't see any way to do this with django-jinja in the docs.
Is there a get_env() type function?
Or a way create an env with all the same settings?
I've tied importing the backend.Jinja2 class and feeding it the setting from TEMPLATES, but it gives me a a KeyError: 'NAME'
Edit: Ah, I found the same issue in the closed issues, with a solution
Might be worth adding to the docs?
I'm using Django-Compressor with Jinja 2. It all works fine with django-jinja using Compressor's extension, until I try to do Offline Compression. Compressor needs a setting (COMPRESS_JINJA2_GET_ENVIRONMENT) to be set to a function that returns the jinja2 environment.
I couldn't see any way to do this with django-jinja in the docs. Is there a
get_env()
type function? Or a way create an env with all the same settings?I've tied importing the backend.Jinja2 class and feeding it the setting from TEMPLATES, but it gives me a a KeyError: 'NAME'
Edit: Ah, I found the same issue in the closed issues, with a solution Might be worth adding to the docs?
Thx for the great lib!