views:

509

answers:

2

How can I remove all entities or reset the local datastore on my dev_appserver? I accidentally recursively called a function to create an entity when testing.

I am using the Google App-engine SDK on Vista with Python.

+7  A: 
dev_appserver.py --clear_datastore myapp

See here for more info.

Shorthand version:

dev_appserver.py -c
Adam Bernier
Wow, looked over that for sure. Thank you
Jason Rikard
+1  A: 

A useful thing to do is to always specify --datastore_path, e.g. --datastore_path=test.datastore.

To delete it you can then just delete the file. You can also keep copies and swap them in and out. And the store will persist over reboots (when /tmp/ the default location for it on Linux anyway, gets cleared)

frabcus