[web2py] Re: records-delete/truncate postgres table in appadmin

2016-08-24 Thread 黄祥
app_cleanup is the admin function cleanup to clean session, cache, dll (same like on admin page). yes, you can, app_cleanup is a prevention, because i created the function that truncate all tables including auth_user, so while u are logged in and run truncate for all table it will raises an

[web2py] Re: records-delete/truncate postgres table in appadmin

2016-08-24 Thread Alex Glaros
what does app_cleanup do? can I truncate only one table and then run this one line clean = app_cleanup(app, request)? thanks Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: records-delete/truncate postgres table in appadmin

2016-08-22 Thread 黄祥
this is what i do in dev environment : *controllers/truncate.py* from gluon.admin import * auth.requires(has_membership_admin)(lambda: None)() def index(): for table in db.tables: db[table].truncate() app = request.application clean = app_cleanup(app, request) redirect(URL('default', 'index') )

[web2py] Re: records-delete/truncate postgres table in appadmin

2016-08-22 Thread Mirek Zvolský
Probably something with foreign key integrity (cascade, restrict, ...) because after deleting of records in other tables it works. However, how to understand such error tickets? Dne pondělí 22. srpna 2016 13:31:50 UTC+2 Mirek Zvolský napsal(a): > > I am trying delete all records with appadmin.