Roger
Roger

Reputation: 5071

How to retrieve the django user profile object in a view?

Is there an easy way to access the user's profile in a view, something like user.profile.my_field?

Upvotes: 1

Views: 971

Answers (1)

Roger
Roger

Reputation: 5071

OK, worked it out. It's user.get_profile.my_field.

Upvotes: 3

Related Questions