Hello, > On 18 Mar 2018, at 09:45, Manasvi Saxena <msmana...@gmail.com> wrote: > > I simply intend to create an option for the developer to use python for > templating rather than DTL or jinja. > Is Python fast compared to any other templating language? Yes.
No. Jinja2 compiles to Python bytecode so it's as fast as Python — and probably faster than what you'd write in three months because a lot of effort went into optimizing its performance over the years. Here's an analogy: "is assembly fast compared to any other programming language?" The answer to that is "No" as well. > Why do we need to process the data using any other language when we are > building our app in python. 20 years of industry show that backend developers prefer template languages for writing templates. Even PHP, which is originally a template language, saw the development of Smarty. And frontend developers want something that isn't too remote from HTML. > Sure DTL or Jinja are python-like, but they are not python. > I intend to develop every functionality offered by jinja or DTL in my python > library and to make it more flexible to use. I'd like an examples of something useful that Jinja2 can't do and where more flexibility is needed. Jinja2 provides logic constructs and arbitrary function calls. (So does DTL but with less convenient APIs.) > Plus the advantage over the current templating system would be speed. > Returning an HTML page with large data is faster than rendering it using DTL. > And templating in python would give an upper hand over templating in DTL. > Yes, the Django templating language has been developed over years but making > another option for the developer to choose from does not have any harm. A library that meets all these requirements exists already: Jinja2. I added first class support for Jinja2 in Django. (Even though additional integration work could be envisioned, I haven't heard demand for that.) > On the Google Summer of Codes submit application page, Django is asking to > choose from two option. > 1. Optimization > 2. Add new feature > > This is the new feature I wish to add. > It has advantages over the previous one. I haven't seen those advantages and I think that's because you don't know the previous one well enough. > For now, I'm not asking Django to replace DTL, I'm simply asking to consider > my idea and provide me with an opportunity of developing it under the > guidance and experience of a mentor. > There will be three evaluations of the project, reject the idea in any of the > evaluation if doesn't seem to be promising. But at least provide with an > opportunity to prove it at least. Sorry if I'm being blunt here but there've been a dozen messages already indicating that you're going into a dead end. I'm afraid we're wasting time. Your prejudice against DTL and Jinja2 is incorrect. I'm not taking issue with the solutions you propose but with the problem you'd like to address. To discuss solutions, we'd have to agree there's a problem worth solving. Even after you proposed multiple angles, I'm still not seeing it. Best regards, -- Aymeric. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/875546D6-FE16-4806-AA44-C779E33D3699%40polytechnique.org. For more options, visit https://groups.google.com/d/optout.