Re: Creating DB objects from dictionaries

2006-09-26 Thread Ivan Sagalaev
James Mulholland wrote: > Suppose I have a dictionary like this: > > data = { 'a':'1', 'b':'2', 'c':'3' } > > and a model like this: > > class Test(models.Model): > a = models.CharField(maxlength=8) > b = models.CharField(maxlength=8) > b = models.CharField(maxlength=8) > > I would

Re: Creating DB objects from dictionaries

2006-09-26 Thread Malcolm Tredinnick
On Tue, 2006-09-26 at 13:50 +, James Mulholland wrote: > Suppose I have a dictionary like this: > > data = { 'a':'1', 'b':'2', 'c':'3' } > > and a model like this: > > class Test(models.Model): > a = models.CharField(maxlength=8) > b = models.CharField(maxlength=8) > b = models.

Re: Creating DB objects from dictionaries

2006-09-26 Thread James Mulholland
Thank you, Malcolm, Ivan :) That just saved me helluva lot of work! -- James --~--~-~--~~~---~--~~ 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

Creating DB objects from dictionaries

2006-09-26 Thread James Mulholland
Suppose I have a dictionary like this: data = { 'a':'1', 'b':'2', 'c':'3' } and a model like this: class Test(models.Model): a = models.CharField(maxlength=8) b = models.CharField(maxlength=8) b = models.CharField(maxlength=8) I would like (in a python script) to be able to say t