Skip to content

Commit c6e083a

Browse files
committed
fix form error
1 parent eebbc7c commit c6e083a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ def add_book():
3636
@app.route("/add/form",methods=['GET','POST'])
3737
def add_book_form():
3838
if request.method == 'POST':
39-
name = request.args.get('name')
40-
author = request.args.get('author')
41-
published = request.args.get('published')
39+
name = request.form.get('name')
40+
author = request.form.get('author')
41+
published = request.form.get('published')
4242
try:
4343
book = Book(
4444
name = name,
@@ -70,3 +70,4 @@ def get_by_id():
7070

7171
if __name__ == '__main__':
7272
app.run()
73+
postgres://ndjfjdaqecakwt:c4444fec8c566815207a1bda26f921505cf0399df9b29eb25b7944e88bc125e8@ec2-54-225-106-93.compute-1.amazonaws.com:5432/d4iseb498qj31j

0 commit comments

Comments
 (0)