Hello All,
When trying to access a user defined profile, using get_profile, I am
getting an error when accessing the profile for a user. Just so I
have my bases covered, here is my model class:
class UserDetail(models.Model):
Position = models.ManyToManyField(Position, blank=True)
pkUser = models.ForeignKey(User, unique=True)
def __unicode__(self):
return self.pkUser.username
and this sits in a file called "scheduler", and in my settings file:
AUTH_PROFILE_MODULE = 'scheduler.UserDetail'
This seems pretty simple. But in my view.py file (in the same
"scheduler" folder), i have:
userObj = User.objects.all()[0]
userPosition = userObj.get_profile().Position
I get this trace back: http://dpaste.com/44604/
The only thing I was able to do to get this to error to change was to
remove my AUTH_PROFILE_MODULE from my settings file.
Any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---