Have a UserProfile
object that successfully extends the django default user
class:
class UserProfile(models.Model):
user = models.OneToOneField(User)
and have updated the settings.py
file accordingly:
AUTH_PROFILE_MODULE = 'authorization.UserProfile'
Everything works fine, just wondering: how do I get to objects associated with UserProfile
for a given context within a view?
Assume that I can just get context.user
if the user is logged in, but then how do I grab the corresponding UserProfile
object?