The sliders are going to be slightly smart. They will need to respond to touch events, moving the circle to match the touch location, and sending an update message to show how far this movement is from the middle. The sliders will automatically return to the center when the touch events stop, so they are somewhat animated. We will use JavaScript for these, and create a JavaScript Slider object definition (equivalent of a Python class) that we can make the two sliders with.
As defined in our HTML, we will put this in static/touch-slider.js. As we are in a .js file, the <script> tags are not needed. We'll start with a constructor for our object, storing the id as a selector, and using the when_updated function ...