Hello eveyone
Iam using flask.
I want link between html and flask , But I encounter a problem that data is not stored in databases. Why?
I previously did a test and passed it, but I don't know what it changed and I couldn't retrieve the code
This code for me :
def create_submission():
error = False
try:
new_venue = Venue(
name=request.form['name'],
city=request.form['city'],
state=request.form['state'],
address=request.form['address'],
phone=request.form['phone'],
facebook_link = request.form['facebook_link'],
)
Venue.insert(new_venue)
flash('Venue ' + request.form['name'] + ' was successfully listed!')
except :
flash('An error occurred. Venue ' + request.form['name'] + ' could not be listed.')