link to othe rpage button flask 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>