Re: Dynamically adding fields to a database model class

2007-01-20 Thread Christian Joergensen
Russell Keith-Magee wrote: > On 1/20/07, Christian Joergensen <[EMAIL PROTECTED]> wrote: >> I suspect there is some django magic happening behind the scenes, and >> maybe the setattr trick is not at all possible. Can anyone shed some >> light on this? > > Yes - the model class has a metaclass that

Re: Dynamically adding fields to a database model class

2007-01-20 Thread Russell Keith-Magee
On 1/20/07, Christian Joergensen <[EMAIL PROTECTED]> wrote: > > I suspect there is some django magic happening behind the scenes, and > maybe the setattr trick is not at all possible. Can anyone shed some > light on this? Yes - the model class has a metaclass that is used to convert the member fi

Dynamically adding fields to a database model class

2007-01-19 Thread Christian Joergensen
Hey I am trying to save myself some time and use a bit of setattr magic[1] on my models. However when I do that, and later need to fetch the value of the field, I get (insted of the actual value): I suspect there is some django magic happening behind the scenes, and maybe the setattr trick is