Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @app.route('/add' , methods=['POST', 'GET'])
- def add():
- if request.method == 'POST':
- post=Post(request.form['title'], request.form['body'])
- db.session.add(post)
- db.session.commit()
- flash('New entry was successfully posted')
- return render_template('add.html')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement