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

Override Django Admin templates #304

Open wowkin2 opened 1 year ago

wowkin2 commented 1 year ago

I can't override Django Admin templates because of TemplateSyntaxError: Encountered unknown tag 'load'.

Despite of tags in template I want to change it fails to understand included and extended templates. I've seen comment in another similar issue https://github.com/niwinz/django-jinja/issues/229#issuecomment-544452454 but it requires separate library to be installed.

Is there a native way to override Admin pages?

wizpig64 commented 1 year ago

Without some glue to join them together (like the tag you linked to which is new for me), you can't mix django and jinja templates natively with django-jinja. so while you could override the templates with jinja2, if they extend or include any other django templates (like the entire admin), you'll get an error as jinja tries to parse django-ese. {% load %} is a django tag that's not supported in the jinja engine, for example.

wowkin2 commented 1 year ago

Why django and jinja are not compatible? Especially in library named django-jinja 🙂 Thinking what should be done to support that.