So if I wanted to copy tables over, but set unique=False
I ended up with the following
audit_table = [copy.copy(f) for f in table]
for i in range(len(audit_table)):
audit_table[i].unique = False
db.define_table(table.table_name + '_auditlog', Audit.audit_template,
*audit_
Sometimes I think to myself and say, "Why didn't I just try that!"
Thank you, both of you!
-Thadeus
On Thu, Jan 28, 2010 at 4:27 PM, mdipierro wrote:
> Or
>
> db.define_table('newname',db.othertable)
>
> On Jan 28, 4:19 pm, DenesL wrote:
>> db.define_table('newname',*[f for f in db.table])
Or
db.define_table('newname',db.othertable)
On Jan 28, 4:19 pm, DenesL wrote:
> db.define_table('newname',*[f for f in db.table])
>
> On Jan 28, 2:20 pm, Thadeus Burgess wrote:
>
> > Is there a way to iterate through the Field() elements of a table and
> > use them to create another similar tab
db.define_table('newname',*[f for f in db.table])
On Jan 28, 2:20 pm, Thadeus Burgess wrote:
> Is there a way to iterate through the Field() elements of a table and
> use them to create another similar table ?
>
> I'm looking for something like
>
> db.define_table('hi', Field('hello'), Field('w
4 matches
Mail list logo