google-app-enginegoogle-cloud-datastoredjango-nonrel

Google App Engine's remote_api: Deleting all data in django nonrel


I'm using django non-rel (http://www.allbuttonspressed.com/projects/django-nonrel) and am trying to delete all the data in my production's datastore. I was reading the question posed here How to delete all datastore in Google App Engine? but the answer wasn't working for me.

Is this because I'm not doing it correctly or because we are using a django where the layers manipulate the data before being saved onto datastore?

Just to clarify, these are the steps I've taken to delete all datastore data.

  1. I went to google app engine's folder in program files

  2. In command line, entered "remote_shell_api.py yourapp /remote_api"

  3. when I got in successfully, I tried to import one of my app folders but it wouldn't allow me to import it, let alone delete it.

  4. Of course, typing my project's equivalent of this also failed

from models import Entry  
query = Entry.all()    
entries =query.fetch(1000)    
db.delete(entries)

I also looked into doing the steps in here (http://code.google.com/appengine/docs/python/tools/uploadingdata.html) but I got really confused. Can anybody clarify the process? Is it different than the normal google app engine projects, if so, how do we use it?


Solution

  • As it turns out, django non-rel uses its own remote shell. So

    manage.py remote shell

    will take you into app engine where you can delete your data that is properly mapped into app engine's datastore. Thanks for all the help guys!