Re: How to run python script by clicking a HTML button?

2018-06-22 Thread Julio Biason
Hi Subhendu, To make this all work, you'll need to do this: 1. Create a Django app 2. Add some URL to a view (any view) 3. Inside the view, run your script. 4. Change the for on the "action" to point to the URL in point 2. You may want to read the Django Tutorial[1] to grasp who those things

Re: How to run python script by clicking a HTML button?

2018-06-21 Thread Jani Tiainen
Hi, Django doesn't exactly work that way. Please do the official tutorial from Django docs to get grasp of basics how things works and are tied together. to 21. kesäk. 2018 klo 23.15 SUBHENDU PANDA kirjoitti: > Below is my HTML code... > > > > > > HTML Forms > > > First name: > >

How to run python script by clicking a HTML button?

2018-06-21 Thread SUBHENDU PANDA
Below is my HTML code... HTML Forms First name: I want is : If you I the "Submit" button, the form-data will be sent to a page called "/myscript.py and will perform the operation". myscript.py: import os def f1(): print ("Below are the files present in