A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/torchbox/django-pattern-library/issues/255 below:

Support overriding Jinja tags / functions

Is your proposal related to a problem?

Part of Jinja2 support plan #180. Version 1.5.0 ships with experimental Jinja support, missing the ability to override tags / functions / filters in particular.

Describe the solution you'd like

A setup similar to how Django Templates tags overrides work, with support for declaring overrides via YAML, or default values globally in Python. In Jinja it would make sense to also do this for functions, not just tags. And possibly filters while we’re at it (see also #114).

Describe alternatives you've considered

N/A

Additional context

I suspect this will require messing with the environment where we inject the custom context: https://github.com/torchbox/django-pattern-library/blob/main/pattern_library/loader_tags.py#L199. However I don’t have a good enough understanding of Jinja to know for sure.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4