Re: [web2py] one form for multiple tables - updating record

2011-07-11 Thread Kenneth Lundström
def display(): record = db.person(request.args(0)) form=SQLFORM.factory(db.person, db.affiliation, db.address, db.card, record) if form.accepts(request.vars, session): record.update_record(**dict(form.vars)) return dict(form=form) The problem is that your are g

[web2py] one form for multiple tables - updating record

2011-07-11 Thread niknok
I've read the section about "one form for multiple tables" and following the example created my function that updates four tables: def register(): form=SQLFORM.factory(db.person, db.affiliation, db.address, db.card) if form.accepts(request.vars): id = db.person.insert(**db.person