On 3/6/07, MattW <[EMAIL PROTECTED]> wrote: > > Dear All, > > I've upgraded to the svn code, but I'm still having problems with user > profiles. > > I've got a method in views.py: > > @login_required > def viewprofile(request): > uname = request.user.username > try: > profile = request.user.get_profile() > except User.DoesNotExist: > request.user.profile.donequestions=[] > request.user.profile.donequestions.save() > > but I keep getting an error: > > DoesNotExist at /accounts/profile/ > MySiteProfile matching query does not exist. > > I know this is mentioned in the book, but I'm not clear on how to > handle the error. > > Thanks, > > Matt > You can read this blog from James Bennett: http://www.b-list.org/weblog/2006/06/06/django-tips-extending-user-model -- I like python! UliPad <<The Python Editor>>: http://wiki.woodpecker.org.cn/moin/UliPad My Blog: http://www.donews.net/limodou
--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---