I try to insert username in to my table

it show

Internal Server Error
The server encountered an internal error and was unable to complete your 
request. Either the server is overloaded or there is an error in the 
application.

it maybe mean no request

i try to change username to '123123'

then it works....

what's problem with this?



@app.route('/user/<username>',methods=['GET','POST'])
def hello(username):
        if request.method=='POST':
            save_friends(username)
            return username


def save_friends(username):
    conn = engine.connect()
    conn.execute("INSERT INTO friends(name) VALUES(username)")
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to