|
|
|
|
|
by danjac
2234 days ago
|
|
Seems we are going full circle: the Python ecosystem had component-based template languages such as ZPT (Zope Page Templates) and Genshi. The former I think is still used with the Pyramid framework, but mostly these approaches have been replaced by Django/Jinja2 text-based templates. So in Jinja2 or Django you would have something like: <h1>{{ page_title }}</h1>
But in ZPT: <h1 tal:content="context/title">Sample Page Title</h1>
If you squint hard enough this doesn't look a million miles different from React or Vue.This approach largely fell out of favor, but I don't know whether that was just due to Django's popularity vs other Python frameworks or Django template language just being more flexible and approachable, especially for front-end developers (and you could use it for any kind of text based content, such as emails). |
|
More flexible and conceptually simpler tend to win over time, as people try to learn less things.