pls try: *e.g.* *test/controllers/install.py (for running with curl)* def index(): if db(db.auth_permission).isempty() and db(db.auth_membership).isempty(): auth_user_id_1 = db.auth_user.insert(first_name = 'Admin', last_name = 'Admin', email = 'ad...@test.com', username = 'admin', password = db.auth_user.password.validate("yourpassword") ) session.flash = T('Installation Done') redirect(URL('default', 'index') )
*test/modules/test_install.py (for running with python)* from gluon import current from gluon.contrib.webclient import WebClient install = WebClient('http://127.0.0.1:8000/test/install/', postbacks = True) install.get('index') if current.T('Log In', lazy = False) in install.text: print (current.T('Installation Done', lazy = False) ) else: print (current.T('Installation Failed', lazy = False) ) *then run in console (assumming web2py already running)* python ~/web2py/web2py.py --nogui --no-banner -S test -M -R ~/web2py/applications/test/modules/test_install.py or curl http://127.0.0.1:8000/test/install best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.