pytest-html
pytest-html copied to clipboard
customize jina template
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?
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.
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.
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 ?
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
I didn't know jinja supported inherit-type functionality.