You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I have seen index.jinja2 which i can modify and see results in report but I want to create new jinja2 template which i want to use same way like css file. how i can do that?
For me the case is simple, but still it would be good to have that custom templates in the future.
I would like to instead of: <p>Report generated on {{ date }} at {{ time }} by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a>
display some other content. Using CSS I can not display that at all but in my case it's some dynamic info. I would like to add.
Maybe a first version of this support is to simply allow a custom jinja-template, and then leave it up to the user to figure out how to make it work. 🤔
i woud recommend having a default template that can be inherited from while replacing blocks for customization to prevent bitrot copies of the full template
Activity
BeyondEvil commentedon Sep 9, 2023
That's not currently possible but is a feature that has been discussed.
Can you share more detail about your use case? It will help us determine a way forward.
marcinosb commentedon Nov 28, 2023
Hello,
For me the case is simple, but still it would be good to have that custom templates in the future.
I would like to instead of:
<p>Report generated on {{ date }} at {{ time }} by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a>display some other content. Using CSS I can not display that at all but in my case it's some dynamic info. I would like to add.
BeyondEvil commentedon Dec 2, 2023
Maybe a first version of this support is to simply allow a custom jinja-template, and then leave it up to the user to figure out how to make it work. 🤔
Thoughts @jeffwright13 ?
RonnyPfannschmidt commentedon Dec 2, 2023
i woud recommend having a default template that can be inherited from while replacing blocks for customization to prevent bitrot copies of the full template
BeyondEvil commentedon Dec 2, 2023
I didn't know jinja supported inherit-type functionality.