Add Brython as first class sitizen

It would be nice that Django supports writing Web Application not only on Backend, but also on Frontend side …

Fortunately there is already exist efficient Python implementation for the Browser - https://github.com/brython-dev/brython

Maybe consider to cooperate with maintainer of Brython ?

Then it will be possible to provide template for project with Brython support …

Just discussion … :wink:

I’m curious - what do you envision as the benefit of such an integration?

Django can already send Brython code out to the browser in the same way it sends JavaScript files out to the browser.

What specifically would you be looking to do that can’t already be done?

I am taking about supporting this project … :wink:

Ok, I follow you there. But what I don’t see is how or where Django fits into the picture of “supporting” it. What is it that you would want Django to do that constitutes support?

Invest time in development and support of Brython as real Python alternative instead of JavaScript … all other projects from my perspective dead (Transcript, PyPy.js and others)

I myself try to spend time improving Brython ( as much as can ( ), but affords of bigger community would improve development of Brython

It would be very sad if Brython maintainer stops working on it (

I agree that Brython is an interesting idea - I am intrigued by it. I would love to see a real browser-based Python implementation.

And to be clear, I’m not saying that Django shouldn’t “support” it - if a case for it can be made - and that is what I’m not seeing.

My question really revolves around why Django (or more specifically and accurately, the people who volunteer their time to work on Django and improve it) should divert their efforts from Django, whether to Brython specifically, or any of the other alternatives that have been or may be developed.

I’m not sure why you think that there are a number of Django developers who are “supporting” JavaScript to the same degree that you would like to see them supporting Brython.

(Or, to be more precise, most people volunteer to work on Django because it makes something they use, better. Very few Django contributors that I know also contribute to any of the JavaScript frameworks. Their “support” of those frameworks is limited to being a user of them - and it’s not like there are hundreds of active contributors to Django to begin with.)

None of those technologies are affected by, nor directly affect, Django. It’s a separate environment with different needs, uses, and goals.

(I do have other opinions regarding the long-term viability of such projects, but that’s really a different topic with a purely personal perspective. I will repeat what I said at the top. I would love to see a real Python implementation in the browser - I’m no fan of the JavaScript language.)

Ken

This project generates dynamic JS validation code and can be used as an example of “why we would like to export some Python code into frontend”: https://facond.readthedocs.io/

But Transcrypt (which we support), is the tool to compile Python into native and fast JavaScript, not really sure what you’d be trying to do with Brython: it’s for running Python code in JavaScript, I assume you’re after generating JavaScript with Python so that browsers will execute it fast.