You might also find this useful (perhaps could incorporate with model_from_csv to identify more field types automatically): http://code.google.com/p/csvstudio/
Anthony On Wednesday, December 21, 2011 7:53:54 AM UTC-5, spyker wrote: > > I have to build new models from csv-data files regularly and have written > a small, primitive script to assist me in this. > > I have attached it. Maybe someone finds it useful. > > Usage: python model_from_csv.py <somefile.csv> > > It will print out a dictionary with a as keys the fields and values the > maximum length of that field and after that the proposed web2py model. > The field types will be either default (string) or text if the length of > the field > 512. > > Regards > Johann > > -- > Because experiencing your loyal love is better than life itself, > my lips will praise you. (Psalm 63:3) > >