Re: Accessing model fields automatically..

2007-03-31 Thread Ramashish Baranwal
On Mar 31, 9:13 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 3/31/07,RamashishBaranwal <[EMAIL PROTECTED]> wrote: > > > I am trying to export a model's data to XML. To do this I'm using the > > model class's _meta.fields. However it doesn't list ManyToManyField > > objects. How can I

Re: Accessing model fields automatically..

2007-03-31 Thread Ramashish Baranwal
On Mar 31, 10:36 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2007-03-31 at 05:27 +,RamashishBaranwal wrote: > > Hi, > > > I am trying to export a model's data to XML. To do this I'm using the > > model class's _meta.fields. However it doesn't list ManyToManyField > > objects. H

Re: Accessing model fields automatically..

2007-03-31 Thread Russell Keith-Magee
On 3/31/07, Ramashish Baranwal <[EMAIL PROTECTED]> wrote: > > I am trying to export a model's data to XML. To do this I'm using the > model class's _meta.fields. However it doesn't list ManyToManyField > objects. How can I get those? Are you aware of the XML serializer? Django already has a modul

Re: Accessing model fields automatically..

2007-03-30 Thread Malcolm Tredinnick
On Sat, 2007-03-31 at 05:27 +, Ramashish Baranwal wrote: > Hi, > > I am trying to export a model's data to XML. To do this I'm using the > model class's _meta.fields. However it doesn't list ManyToManyField > objects. How can I get those? > > My code looks something like this- > > # returns

Accessing model fields automatically..

2007-03-30 Thread Ramashish Baranwal
Hi, I am trying to export a model's data to XML. To do this I'm using the model class's _meta.fields. However it doesn't list ManyToManyField objects. How can I get those? My code looks something like this- # returns data of inst in a dict def get_data(inst): data = {} for field in inst._me