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 <[email protected]> wrote: > hello > > how I can automatically load a database from a csv. > > The idea is that when my application starts for the first time, load > the database as countries, states, etc. without having to do it by > hand. > > I tried loading it through the next line. > db.country.import_from_csv_file(open('.../static/continente.csv'), > 'rb')) > > The continent is in the file folder / static / continente.csv > application. > > will I need to do it with sys sys.path?? > > As I can do this. > Thanks.

