from app import app
from flask import render_template
@app.route('/profile/<id>')
def profile(id):
sql="""SELECT * FROM users WHERE id='%(id)s'"""%{"id":id}
data=db.query(sql)
user={'id': data[0],
'email':data[1],
'password':data[2],
'first_name':data[3],
'last_name':data[4],
'image':data[5]}
return render_template("profile.html",user=user)
user={'id': data[0],
TypeError: 'NoneType' object has no attribute '__getitem__'