miguelgrinberg/REST-tutorial — pull request #7 by jmdacruz (2014-03-13 16:37:26+00:00)
Title: Adding Flask-RESTful example using MongoDB as backend for tasks

Miguel,

I've added the example as you requested, and also modified the requirements and README files to include some updated information. You'll note that the example is not an exact copy of the original, since I actually built it by following your instructions from scratch. I've also added some comments in the code to highlight some differences with the original example, e.g., task IDs are now strings (because MongoDB IDs are not integers). Finally, for marshaling to work correctly I had to manually recreate the 'id' field of the task object, since the original '_id' obtained from MongoDB is of type 'ObjectID' (the inverse also apply when finding items in the database using string IDs received from the REST calls)

Thanks,
Marcelo.