Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
greg@earth ~/Development/_freelancer/crud_operations_in_mongodb_using_python $ python main.py
Loading all items from database:
ID = 54953f0a8524880d021cd856 | Title = Wordpress website for Freelancers | Price = 250
ID = 54953f408524880d0db9a8a1 | Title = Wordpress website for Freelancers | Price = 250
ID = 54953f788524880d14d4e590 | Title = Wordpress website for Freelancers | Price = 250
Saving new_project to database
new_project saved to database
Loading new_project from database
new_project = {'price': 250, '_id': ObjectId('549546f68524880e86271de3'), 'assigned_to': u'John Doe', 'description': u'This should be a very simple website, based on wordpress with functionalities for Freelancers', 'title': u'Wordpress website for Freelancers'}
Updating new_project to database
new_project updated in database
Reloading new_project from database
new_project = {'price': 350, '_id': ObjectId('549546f68524880e86271de3'), 'assigned_to': u'John Doe', 'description': u'This should be a very simple website, based on wordpress with functionalities for Freelancers', 'title': u'Wordpress website for Freelancers'}
Deleting new_project to database
new_project deleted from database
Trying to reload new_project from database
Item with id = 549546f68524880e86271de3 was not found in the database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.