I have an issue with sqlite 3 python flask course

data not inserted into database

from flask import Flask ,render_template ,request

import sqlite3

app= Flask(name)

conn = sqlite3.connect(“mycollege.db”)

curr= conn.cursor()

curr.execute(“select count(*) from sqlite_master where type=‘table’ and name=‘student’”)

if curr.fetchone()[0] ==1:

print ("table already exist")

else:

conn.execute("CREATE TABLE student (name TEXT, addr TEXT ,city TEXT, pin TEXT)")

print("table created")

conn.close()

@app.route(’/’)

def index():

return render_template("index.html")

@app.route(’/addstudent’)

def addstudent():

return render_template('addstudent.html')

@app.route(’/saveStudent’, methods=[‘GET’,‘POST’])

def savestudent():

msg = ''

if request.method == 'POST':

       

    try:

        name = request.form.get('studname')

        addr = request.form.get('studaddr')

        city = request.form.get('studcity')

        pin = request.form.get('studpin')

        with sqlite3.connect('mycollege.db') as conn:

            curr = conn.cursor()

            curr.execute(f"INSERT INTO student (name ,addr ,city ,pin) values ( ? ,? ,? ,? )",(name,addr,city,pin))

            conn.commit()

            msg= "data inserted successfully"

    except:

        conn.rollback()

        msg = "could not insert data"

return render_template('sucess.html',msg=msg)

if name == “main”:

app.run(debug=True)

can you share the code of addStudent.html?