Karen Tracey wrote:
> On Mon, Sep 8, 2008 at 6:42 AM, sveri <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>
>     Hi,
>
>     i am using Django 1.0 and try to extent the usermodel, which works so
>     far
>     for adding new users.
>
>     But when i want to retrieve a user profile i get a weird error:
>
>     user = get_object_or_404(User, id=9)
>     user.get_profile()
>
>     Traceback (most recent call last):
>      File "<console>", line 1, in <module>
>      File "/usr/lib/python2.5/site-packages/django/contrib/auth/
>     models.py", line 293, in get_profile
>        self._profile_cache =
>     model._default_manager.get(user__id__exact=self.id <http://self.id>)
>     AttributeError: 'NoneType' object has no attribute '_default_manager'
>
>     This is what happens when i try that in the console.
>
>     I dont know what to do with that messages.
>     And googling didn't help either.
>
>
> Searching this group for the "'NoneType' object has no attribute 
> '_default_manager'" message, this thread comes up:
>
> http://groups.google.com/group/django-users/browse_thread/thread/8494cd87bf181018/e73fed4cdbd80a4e
>
> Perhaps your problem has the same solution.
>
> Karen
>
Indeed, and i thought i doublechecked everything.
It was a mistake i made.
In settings.py AUTH_PROFILE_MODULE i used: 'project.userprofile'
instead of 'model.userprofile' which works now.


Thank you
Sven


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to