Instead of

db(db[tbl].id>0).delete()

you can use

db[tbl].truncate()

which is faster but does not work on GAE.

On Apr 28, 8:18 pm, mart <msenecal...@gmail.com> wrote:
> Hi,
>
>  I'm thinking this should work... its done through script. Should I be
> doing it differently?
>
> thanks,
> Mart :)
>
> def deleteRecords():
>     _tables=['auth_user',
>                         'auth_group',
>                             'auth_membership',
>                                 'auth_permisssion',
>                                     'auth_event',
>                                         'local_user',
>                                             'local_history']
>     for tbl in db.tables:
>         if not tbl in _tables:
>             db(db[tbl].id>0).delete()

Reply via email to