niwinz / django-jinja

Simple and nonobstructive jinja2 integration with Django.
http://niwinz.github.io/django-jinja/latest/
BSD 3-Clause "New" or "Revised" License
363 stars 102 forks source link

Converting from jinja2 to django-jinja #305

Closed bobort closed 1 year ago

bobort commented 1 year ago

I'm in the process of converting from jinja2 to django-jinja due my requirement to handle translations more appropriately. Unfortunately, the process is not as easy as it could be. I kept as much as the default configuration as possible from jinja2. All of my templates were in a folder called jinja2, and they all have html extensions. I'm trying to change the default settings that django-jinja has so that I can continue to utilize this naming scheme. However, the documentation needs to explain how to do this better.

I do also use the third-party compressor jinja2 extension.

wizpig64 commented 1 year ago

The docs do describe how to use the .html naming scheme, i think you want the third and final example block: https://niwi.nz/django-jinja/latest/#_advanced_template_pattern_matching --

And here for adding extensions, probably using compressor.contrib.jinja2ext.CompressorExtension in place of path.to.your.Extension: https://niwi.nz/django-jinja/latest/#_add_additional_extensions

Pull requests are open if you think the docs could use better explaining.

bobort commented 1 year ago

I'm so sorry. I stand corrected. I don't know how I managed to skip over that part. Thank you for the help!

wizpig64 commented 1 year ago

No problemo!