DEV Community

Discussion on: Flask Rest API -Part:1- Using MongoDB with Flask

paurakhsharma profile image
Paurakh Sharma Humagain Author

Thank you so much ❤️
Can you point me what is missing so that I can add it here.

therealibukun profile image
the-real-ibukun • Edited on

Missing function definition add_movie()

@app.route('/movies', methods=['POST'])
body = request.get_json()
movie = Movie(**body).save()
id =
return {'id': str(id)}, 200

.movie not required

from import Movie

Apart from that it's ready to run 😃