Re: Get to fields of a model

2007-03-28 Thread Jiri Barton
Why, I thought Person.position would be the straightforward way. I mean that was the first thing that came to my mind - I have a class and its attributes. So, the class name + dot + the class attribute name. I thought, well, if Django can detect I'm accessing a class attribute and throw an excep

Re: Get to fields of a model

2007-03-28 Thread Malcolm Tredinnick
On Wed, 2007-03-28 at 07:10 -0700, Jiri Barton wrote: > Is there a way of accessing fields of a model? > > I have > > class Position(models.Model): > > > class Person(models.Model): > position = models.ForeignKey(Position) > > Now, I'd like to get to this position member. Is there