7 ms·
It feels weird at the beginning, but after a bit of practice I found it pretty nice to write HTML in Python. Here is an example of a HTML page layout written w
by rougemine 2y ago
It feels weird at the beginning, but after a bit of practice I found it pretty nice to write HTML in Python.
Here is an example of a HTML page layout written with the DOMinate [1] library for example, in a "JSX-like" way:
https://github.com/olivierphi/zakuchess/blob/main/src/apps/webui/components/layout.py https://github.com/olivierphi/zakuchess/blob/main/src/apps/w...
It may hurt your eyes at first sight, for sure... But similarly to technologies like Tailwind CSS, it's mostly a matter of getting used to it - and after a while it end ups feeling very natural to use :-)
1: https://github.com/Knio/dominate#readme https://github.com/Knio/dominate#readme
- VagabundoP 2y agoDominate is quite fast as well. I did a few tests vs jinja for my flask app and it beat the pants off it.