Do we need Jinja any more?

Hello,
I am very excited about Pyscript project.
we can be independent from JS (at least on the surface) in order to bring our projects up.
A question though,
with the help of pyscript we can be free from Jinja?
I’m not very familiar with frontend at all, sorry if it is nooby question.

Jinja is a templating engine that is in some ways similar to Django’s. PyScript is not designed to replace frameworks that generate HTML. PyScript allows the execution of Python in the browser, whereas Jinja generates HTML. I can envision both working together. Jinja can continue to generate HTML that PyScript applications interact with via the DOM.

One of the many reasons why frameworks are so popular is that they make creating the visual interface easier. Jinja is an option to do that as well. PyScript, at this time, does not offer a framework for the visual presentation in the browser. I do see that happening. As part of my experimentation with PyScript, I wrote Python code to generate the tedious parts of HTML presentation such as converting JSON and CSV raw data into a nicely formatted table inside the browser. I expect to see real frameworks developed to provide similar functionality.

2 Likes

John is right that the two things aren’t necessarily related. BUT…PyScript IMO is going to present opportunities which make use rethink Python templating. Which I’m mega in favor of.

1 Like

Nice,
All the apps and companies tend to use more and more from the front end and reduce the costs of their company.
As a person who has less amount of experience on front end, I would be more than happy to see real examples and docs using Jinja and Pyscript.
And can’t wait to see “functioning” version of Pyscript.

One excellent method to learn and reinforce your knowledge is to create examples, write articles, etc. Challenge yourself to write a Jinja+PyScript example and publish it here.

1 Like