...another issue is that you cannot delete all the rows from such
table as you will trigger the defaults reload.

On Nov 21, 7:45 pm, achipa <[EMAIL PROTECTED]> wrote:
> Yes, I use something similar ATM, but I'm concerned about the overhead
> if you have a large number of tables...
>
> On Nov 21, 7:26 pm, mdipierro <[EMAIL PROTECTED]> wrote:
>
> > if not db(db.table.id>0).count(): db.table.import_from_csv_file(open
> > ('mytable.csv'))
>
> > Massimo
>
> > On Nov 21, 12:24 pm, achipa <[EMAIL PROTECTED]> wrote:
>
> > > We have talked about this previously, but the CSV import/export in the
> > > previous topic reminded me - wouldn't it be nice to have a sort of
> > > SQLDefaultData('mytable.csv') entry in the model, which would contain
> > > the default contents of the table ? If the migrator decides it needs
> > > to create the table, it could just fill it up with the values from the
> > > file (loading from code or the model file is not that elegant as it
> > > doesn't know if the tables has been just created or already there and
> > > just got empty via user interaction). Or does this sort of
> > > functionality already exist and I just somehow missed it ? :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to