Dear All,

I have a view method that looks like this:

@login_required
def viewprofile(request):
    uname = request.user.username
    profile = request.user.get_profile()
    return HttpResponse(uname)

I have a models.py file that includes:

class MySiteProfile(models.Model):
    user = models.ForeignKey(User, unique=True)
    doneQuestions = models.ForeignKey(Question)

And I get an error:

ValueError at /accounts/profile/
too many values to unpack
Request Method:         GET
Request URL:    http://localhost:8000/accounts/profile/
Exception Type:         ValueError
Exception Value:        too many values to unpack
Exception Location:     /usr/lib/python2.4/site-packages/Django-0.95-
py2.4.egg/django/contrib/auth/models.py in get_profile, line 245

Any pointers as to what is happening ?

Thanks,
Matt


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