3 ms·
You laugh, but Odoo* 's hand-rolled, Backbone.js-based frontend framework includes an interpreter for a subset of Python. They call it py.js. I'm not fucking wi
by greenshackle2 10y ago
You laugh, but Odoo* 's hand-rolled, Backbone.js-based frontend framework includes an interpreter for a subset of Python. They call it py.js. I'm not fucking with you.
https://github.com/odoo/odoo/tree/10.0/addons/web/static/lib/py.js https://github.com/odoo/odoo/tree/10.0/addons/web/static/lib...
Just so that you can experience the full horror: Yes, the Python server ships XML templates with raw embedded Python code to the client. The client then parses the XML and interprets the Python using this py.js thing.
If the embedded Python needs to access the database (and it almost always does), the client makes calls to a JSONRPC interface on the server.
(If you ever think of using Odoo. Don't. Just... don't.)
*An open source ERP.