Re: create a model instance from dictionnary

2007-02-03 Thread Sebastien Armand [Pink]
Thanks a lot, I haven't practice Python for a while, forgot lots of things... 2007/2/3, Leo Soto M. <[EMAIL PROTECTED]>: > > > On 2/2/07, Sebastien Armand [Pink] <[EMAIL PROTECTED]> wrote: > > Is it possible to instantiate a model class from a dictionnary? > > > > I mean instead of using: > > > >

Re: create a model instance from dictionnary

2007-02-02 Thread Leo Soto M.
On 2/2/07, Sebastien Armand [Pink] <[EMAIL PROTECTED]> wrote: > Is it possible to instantiate a model class from a dictionnary? > > I mean instead of using: > > MyModel(arg1=1,arg2=2,...) > > I'd like to use: > > data= {'arg1':1,'arg2':2,...} > MyModel(data) Just use standard python syntax: