flask button redirecty code example
Example: Howt o get redirected to another page using a button in HTML using Python using Flask
<button type="button" onclick="window.location.href='{{ url_for( 'dataTablePage' , table='Y' ) }}';">Display Table Y</button>