cnaas-nms icon indicating copy to clipboard operation
cnaas-nms copied to clipboard

Add a mechanism for easily loading third party template tag libraries

Open lunkwill42 opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

We constantly find ourselves writing new template tags to make our template logic more concise. Some of these functions are accepted upstream, while some of them are very specific to our own setup and do not belong upstream.

Currently, we need to patch CNaaS-NMS locally to add our own template tags, which becomes rather tedious every time we need to do it, or every time we need to upgrade CNaaS-NMS.

Describe the solution you'd like

It would be much better if there was a mechanism or option to configure a list of third party Python modules with template tag functions, to import at runtime and make available when rendering Jinja2 templates.

Describe alternatives you've considered

Keep using the tedious manual patch management.

lunkwill42 avatar Dec 12 '23 13:12 lunkwill42