On Jun 4, 1:30 am, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:

> > I am using setattr(self, fieldname, value) to set a value on a field
> > for which i do not know anything but the name. Is that common django
> > idiom, or are there better ways to do this?

> This isn't a Django-specific feature, it's part of Python itself - and
> yes, it's a common idiom.

OK, thanks. It just felt a bit 'low level'. That's why i wouldn't have
been surprised if django had some other mechanism for accessing fields
by (string) name.

eelco
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to