I have been looking at extending the Django user model, and while I am confident I can make it work, there is a line of code that I really want to understand.
I have been referencing the following tutorial: http://blog.tivix.com/2012/01/06/extending-user-model-in-django/
but I can not for the life of me understand how the following line of code works:
User.profile = property(lambda u: u.get_profile() )
If I understand correctly, this sets the getter method for User.profile to an anonymous function that takes a user as an argument and returns the profile, BUT, if I am referencing myuser.profile, when is the argument actually passed?
I hope I communicated myself properly. Any help understanding this would be greatly appreciated!