I'm just starting out with python and since I'm coming from a PHP background (thus have to adjust my mind to wrap around new concepts) one major question still stands without answer - why does Flask need a template engine?
The way I was used to go about things, was to have a
template.html that contained valid html without any logic and then, when needed, just load the file into a
DOMDocument object and navigate it using
DOMXpath. This made perfect sense to me - leave the UI part separate from the LOGIC part.
But now since I'm starting to learn a new language, it kinda forces me to get back to mixing in logic with the UI. So it boils down to this - is it me, is the DOM and xpath route just something I do to make my life "harder", or is Flask wrong to use a template engine?