Please help me in this case, thank very much.
On Tuesday, March 15, 2011 6:11:25 PM UTC+7, toan75 wrote:
>
> Hi Massimo Di Pierro,
>
> How do get "requires", "defaut", "represent",... from field:
> db.mytable.myfield for create string:
> "Field('myfield', requires=..., default=..., represent=...
Dear Jose,
I think you posted a very interesting example... how have you resolved
the problem of the spatial support by web2py?
I mean the fields of the tables you are going to create dynamically are
the ones of a tipically spatial extension of a db... are they supported
by web2py DAL? Can you
Hi Massimo Di Pierro,
How do get "requires", "defaut", "represent",... from field:
db.mytable.myfield for create string:
"Field('myfield', requires=..., default=..., represent=...)" ?
Thanks.
On 14 mar, 16:23, Massimo Di Pierro
wrote:
> something like
>
> db.define_table('name',*{Field(name) for name in ])
>
> On Mar 14, 11:24 am, Jose wrote:
>
> > Thanks Massimo.
Exactly, that's what I need.
Thank you
something like
db.define_table('name',*{Field(name) for name in ])
On Mar 14, 11:24 am, Jose wrote:
> Thanks Massimo.
>
> In my case the table "meta" corresponds to "locations. "
>
> What I posted works fine, but the question I have is how to create
> fields using a loop. Perhaps a method ad
Thanks Massimo.
In my case the table "meta" corresponds to "locations. "
What I posted works fine, but the question I have is how to create
fields using a loop. Perhaps a method add_field.
Best regards
Jose
db.define_table('meta',Field('name'))
for row in db(db.meta).select():
db.define_table(row.name,Field('fieldname'))
def dynamically_add_new_table(db,name):
db.meta.insert(name=name)
db.define_table(name,Field('fieldname'))
then you call the function dynamically_add_new_table for the
7 matches
Mail list logo