i want to display all the data in my table to a webpage using python when i click a button. here is my app.py code can anyone help me to finish this please..
def POST(self):
form = web.input(name="a", newname="s", number="d")
conn = MySQLdb.connect(host= "localhost", user="root", passwd="", db="testdb")
x = conn.cursor()
x.execute("SELECT * FROM details")
conn.commit()
items = cursor.fetchall()
return items()
conn.rollback()
conn.close()
return render.index()
i want to display it on index.html.and table has 3 colums
<h1>Data</h1> <br/> <br> <table border="1"> <tr> <th>Name></th> <th>address</th> <th>number</th> </tr> <tr> <td></td> <td></td> <td></td> </tr><td>parts because i dont know how to call it to this form