I have spent about 2 hours on this so far, but havent been able to get
it right, my model is:

(located in schedule/models.py, stripped down to just the profile)

from django.contrib.auth.models import User
class profile(models.Model):
    user = models.ForeignKey(User, unique=True)
    aim = models.CharField(max_length=100, blank=True)
    website = models.CharField(max_length=100, blank=True)

and i have this as my setting:
AUTH_PROFILE_MODULE = 'schedule.profile'



I did a syncdb and it showed the profile successfully being added...

then i did in "python manage.py shell":
from django.contrib.auth.models import User
u = User.objects.get(pk=1)
print u.get_profile().aim

but I get this error:
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)
  File "/usr/lib/python2.5/site-packages/django/db/models/manager.py",
line 93, in get
    return self.get_query_set().get(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/django/db/models/query.py",
line 303, in get
    % self.model._meta.object_name)
DoesNotExist: profile matching query does not exist.



anyone have any idea what is wrong?



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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