My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Nuke  
Completely wipe the datastore
Updated Jun 27, 2010 by kostmo

Sometimes when developing a new App Engine app, you want to start fresh with the datastore, wiping everything. Unfortunately, this can be a cumbersome process with the existing interface.

Nuke is a "add-in" to the admin panel that lets you delete all entities of a specific kind, or all entities of all kinds with a button click.

  1. Copy bulkupdate into your application's root directory:
  2. git clone git://github.com/Arachnid/bulkupdate.git
  3. Copy nuke into your application's root directory:
  4. svn export http://jobfeed.googlecode.com/svn/trunk/appengine/nuke
  5. Modify your app.yaml to include the following (this will install both nuke and bulkupdate):
  6. admin_console:
      pages:
      - name: Bulk Update Jobs
        url: /_ah/bulkupdate/admin/
    
      - name: Nuke
        url: /_ah/nuke/
    
    handlers:
    - url: /_ah/queue/deferred
      script: $PYTHON_LIB/google/appengine/ext/deferred/handler.py
      login: admin
      
    - url: /_ah/bulkupdate/admin/.*
      script: bulkupdate/handler.py
      login: admin
    
    - url: /_ah/nuke/.*
      script: nuke/nuke.py
      login: admin
  7. Redeploy your application
  8. appcfg.py update .
  9. Nuke your datastore
    • Nuke expects all of your models to be defined in a file named models.py (example) in your root application directory. If this is not the case, you may edit the nuke.py script as desired.

Sign in to add a comment
Powered by Google Project Hosting