Re: djangoproject access fields of object dynamically

2010-08-04 Thread Steve Holden
On 8/4/2010 5:26 AM, ars_sim wrote: > > > Hello, Can anyone help me? > > I have list of fields called 'allowed_fields' and I have object called > 'individual'. > allowed_fields is sub set of individual. Now I want to run loop like > this > > for field in allowed_fields: > obj.field = individual

djangoproject access fields of object dynamically

2010-08-04 Thread ars_sim
Hello, Can anyone help me? I have list of fields called 'allowed_fields' and I have object called 'individual'. allowed_fields is sub set of individual. Now I want to run loop like this for field in allowed_fields: obj.field = individual.field obj have same fields like individual. Do you have