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: MyModel(**data) -- Leo Soto M. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---