[Answered ]-Django: Create a model field referencing a ForeignKey field

2👍

You can use the @property as a decorator.

@property
def name(self):
    return self.person.name

Now, you can just reference it as

member.name

instead of member.name()

Now, name is treated as a property on Member class, instead of a class method.

Leave a comment