Run your web2py app with a command from your GAE library and the flag - c. i.e: dev_appserver.py -c C:\web2py
On Jan 28, 9:31 pm, Nathan VanHoudnos <nathan...@gmail.com> wrote: > Hi, > > I'm running web2py 1.91.6 on google app engine. I'd like to delete > everything in the datastore and start over. > > If you have a quick solution for this, stop reading now and just tell me the > "web2py" way. :) > > There is a StackOverflow thread that I found: > > http://stackoverflow.com/questions/1062540/how-to-delete-all-datastor... > > which assumes that you setup everything in Models.py which uses syntax very > different from the DAL and I can't make heads or tails of it. > > I tried using the remote_api to do the deletion: > > vanhoudn@gauze:~/workspace/creatia-rubrics/src$ python2.5 > ~/google_appengine/remote_api_shell.py creatia-rubrics > App Engine remote_api shell > Python 2.5.5 (r255:77872, Sep 14 2010, 17:16:34) > [GCC 4.4.3] > The db, users, urlfetch, and memcache modules are imported. > creatia-rubrics> from google.appengine.ext.db import GqlQuery > creatia-rubrics> query = GqlQuery("SELECT * FROM allRatings") > Traceback (most recent call last): > File "<console>", line 1, in <module> > File > "/home/vanhoudn/google_appengine.1.4.1/google/appengine/ext/db/__init__.py" , > line 2296, in __init__ > model_class = class_for_kind(self._proto_query._entity) > File > "/home/vanhoudn/google_appengine.1.4.1/google/appengine/ext/db/__init__.py" , > line 266, in class_for_kind > raise KindError('No implementation for kind \'%s\'' % kind) > KindError: No implementation for kind 'allRatings' > > But it gives me this weird KindError. Before i can get to the > > db.delete(query) > > step. So how do you access the kinds that you create in models/db.py? I > copied the GQL statement straight from the datastore viewer on > appspot.comso it shouldn't be a syntax error. > > The relevant section of my models/db.py is: > > db.define_table('allRatings', > Field('timeend','datetime',requires= IS_NOT_EMPTY() ), > Field('timestart','datetime',requires= IS_NOT_EMPTY() ), > Field('assignmentId',requires= IS_NOT_EMPTY() ), > Field('experimentId',requires= IS_NOT_EMPTY() ), > Field('workerId',requires= IS_NOT_EMPTY() ), > Field('studentIds',requires= IS_NOT_EMPTY() ), > Field('rubricCode',requires= IS_NOT_EMPTY() ), > Field('ipaddress' ,default=request.client), > Field('comment',requires= IS_NOT_EMPTY() ), > Field('rawAnswers',requires= IS_NOT_EMPTY() ), > Field('subscores',requires= IS_NOT_EMPTY() ) > ) > > Any help would be appreciated! > > Cheers, > -- > Nathan VanHoudnos > |- Statistics & Public Policy PhD student > |- Program for Interdisciplinary Education Research (PIER) Fellowship > |- Carnegie Mellon University > |-http://www.andrew.cmu.edu/user/nmv > > "Neglect of mathematics works injury to all knowledge, > since he who is ignorant of it cannot know the other > sciences or the things of this world." -- Roger Bacon