I have a model in an application called user_profile , for example:
from django.db import models from django.contrib.auth.models import User class UserProfile(models.Model): user = models.OneToOneField(User) def __unicode__(self): return self.user.username
and in my settings:
AUTH_PROFILE_MODULE = 'user_profile.UserProfile'
But if I try:
u = UserProfile.objects.get(pk=1) p = u.get_profile()
I get the following error:
AttributeError: 'UserProfile' object has no attribute 'get_profile'
What am I missing here?
Any help would be greatly appreciated.
source share