The fastest thing is to learn the framework. Building one by hand takes more time than you think. I have never used flask. Django is very fast. Just build the Model and then just write Url, View and Template. Your requirement is actually that the user submits the form on the front end and then you receive and process it on the back end. This is the most basic function of any framework. If you don't understand something, just read the documentation. If you can't solve it in the documentation, come to Segmentfault and ask or think about whether you can use algorithms to solve it.
In my humble opinion, I recommend flask for rapid prototyping. The learning cost is very low and it is easy to write small projects. Django is too heavy for your needs. It just transmits data from the server. If you want to interact, just use flask to write the logic.
Isn’t the questioner asking about client js? Why don’t you recommend him to look at jquery directly? After looking at jquery for a day, he can almost solve the problem mentioned by the original poster, but he can’t run py locally
What the poster wants to ask is: Online programming? For example: http://codepad.org/ http://www.pythontip.com/codi... https://www.codecademy.com/zh... Similarly, the w3c tutorial is like this of. From the front-end point of view, the code input by the user is submitted directly to the back-end (the front-end basically cannot perform verification); The back-end has to consider security risks. For example, the user input: import os os.system('rm -rf *') (The websites given above should all restrict the os command, but there can also be countless kinds of "hazardous" codes. For example: Calculate the 100th power of a number, etc.)
The fastest thing is to learn the framework. Building one by hand takes more time than you think. I have never used flask. Django is very fast. Just build the Model and then just write Url, View and Template. Your requirement is actually that the user submits the form on the front end and then you receive and process it on the back end. This is the most basic function of any framework. If you don't understand something, just read the documentation. If you can't solve it in the documentation, come to Segmentfault and ask or think about whether you can use algorithms to solve it.
In my humble opinion, I recommend flask for rapid prototyping. The learning cost is very low and it is easy to write small projects. Django is too heavy for your needs. It just transmits data from the server. If you want to interact, just use flask to write the logic.
Django/Flask + Celery task queue, I use Django + Celery myself
Isn’t the questioner asking about client js? Why don’t you recommend him to look at jquery directly? After looking at jquery for a day, he can almost solve the problem mentioned by the original poster, but he can’t run py locally
Why not rewrite your python script with js. . .
Refer to CGI. Is the poster talking about similar functions like this:
https://www.bytelang.com/o/s/...
Owner, I happen to know someone who can perfectly solve your problem——wooey
https://wooey.herokuapp.com/
What the poster wants to ask is: Online programming? For example:
http://codepad.org/
http://www.pythontip.com/codi...
https://www.codecademy.com/zh...
Similarly, the w3c tutorial is like this of.
From the front-end point of view, the code input by the user is submitted directly to the back-end (the front-end basically cannot perform verification);
The back-end has to consider security risks. For example, the user input:
import os
os.system('rm -rf *')
(The websites given above should all restrict the os command, but there can also be countless kinds of "hazardous" codes. For example: Calculate the 100th power of a number, etc.)