[web2py] Re: import csv automatic

2010-11-17 Thread Aurigadl
#This was my solution. import os db.define_table('sgd_pa_cont_continente', Field('cont_nombre',writable=False, required=True, notnull=True)) appfolder = os.path.normpath(request.folder) fileCsv = os.path.join(appfolder, 'static','continente.csv') db.import_from_csv_file(open(fileCsv, 'rb'

[web2py] Re: import csv automatic

2010-11-16 Thread DenesL
There is an example at: http://web2py.com/book/default/chapter/06?search=csv#Exporting-and-Importing-Data To get the path you could use request.folder filename=".\\%s\\static\\continente.csv"%request.folder Denes. On Nov 16, 6:39 pm, Aurigadl wrote: > hello > > how I can automatically load a