How does Django pass the numbers selected by html to the backend?

Hello everyone, I used django2.0 to make an operation and maintenance platform, and used the form form in the front page a.html. The effect is shown in figure

clipboard.png

now you need to select the corresponding data sequence number in a.html, click "execute" on the page, and a dialog box will pop up-"are you sure you want to execute?" After clicking OK, there will be a python script in the background (not in the django system, such as / tmp/aaa.py) to perform the task with the serial number. An execution result is then returned to b.html.

I can now get the corresponding sequence number in views.py, but how can you pass this "sequence number" to the aaa.py script in the background? Do I have to use ajax?


Django has a RadioSelect form option
if you are using Form output, you can do the confrim action when you onsubmit. Normally, you need JS to complete this logic.

HTML:

<script>
function clicked(e)
{
    if(!confirm('Are you sure?')) {
        
    }
}
</script>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb6f46-2619.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb6f46-2619.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?