i'm doing this actually. i put the request params in a loop and add each param to the dict with its value. and then i'm just using instance = Model(**dict). i'm using declarative base by the way.
On 16 Temmuz, 14:23, "[email protected]" <[email protected]> wrote: > Assuming you are using sqlalchemy: > > users = Table('users', metadata, > Column('user_id', Integer, primary_key=True), > Column('name', String(40)), > Column('age', Integer), > Column('password', String), > ) > > i = users.insert() > i.execute(name='Mary', age=30, password='secret') > i.execute({'name': 'John', 'age': 42}, > {'name': 'Susan', 'age': 57}, > {'name': 'Carl', 'age': 33}) > > Best, > timor > cyhex.com > > On Jul 15, 9:41 pm, Gisborne <[email protected]> wrote: > > > > > I can't seem to locate a command that would create a row in a mapped > > table given a dict with column names and values. > > > Seems a reasonable thing to want, but if it's in the docs, I'll be > > blasted if I can find it. -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

