It works great. Thanks a lot !!
On Feb 3, 11:23 am, Anthony <abasta...@gmail.com> wrote: > > Model > > --------------------- > > dba = DAL('sqlite://storage.sqlite') > > auth = Auth(dba, hmac_key=Auth.get_or_create_key()) > > > Controller > > -------------------------------------- > > def import_csv(table, file): > > table.import_from_csv_file(file) > > > def index(): > > if request.vars.csvfile != None: > > import_csv(db[request.vars.table],request.vars.csvfile.file) > > Since your database object is dba, the above line should be > dba[request.vars.table]. > > {{=FORM(str(T('or import from csv file'))+" > > > ",INPUT(_type='file',_name='csvfile'),INPUT(_type='hidden',_value='dba.auth > > _user',_name='table'),INPUT(_type='submit',_value='import'))}} > > request.vars.table should just be the table name, without the "dba." -- so, > _value='auth_user'. > > Anthony