Jinja templating in custom renderHtml

Dears,

Finally I found that renderHtml custom widget does the job for small custom prints, easy records.
I was yet wondering if it could be possible to include some jinja templating system, it would for iteration, conditions …

Thanks !

2 Likes

It is a good idea. If you know html/css/js, making a new type of custom widget is pretty easy, and there are examples here:

Custom widgets themselves can use templates by including a templating framework. We’ve written some with Vue.js which has constructs you would recognize as jinja-like, e.g. the invoice widget has lines like:

1 Like

Thanks for your advices.

I have practiced a little vuejs for internal stuff.
I am not a developper and I’m not as comfortable with js as I am with python (flask dev for small needs)

I found really powerfull to have python in cell (even fonction are supported) so I’m writting the html result in python and was thinking jinja could help clarifying the result.

Custom widgets themselves can use templates by including a templating framework.

=> Does this mean I can directly write with vuejs directive (framework already included) or do I need to incorporate it ?
=> I also need to serve my customwidget from a githubpage → to be initiated

1 Like