mongokit remove all items from collection -



mongokit remove all items from collection -

i remove items test collection. setup is

connection = connection(app.config['mongodb_host'], app.config['mongodb_port']) db = connection.test_database.tutorial

i have document model class test maps tests collection. i've tried deleting collection both

connection.test_database.drop_collection('tutorial.tests') db.tests.remove()

however querying like

list(db.test.find())

still gives me old data. like

list(db.tests.find())

returns empty list. if add together new entries tests previous query doesn't reflect changes, don't think thats accurate either.

problem line: db = connection.test_database.tutorial since saying test database , tutorial collection

removing worked when changed db = connection.tutorial

mongokit

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -