On 9/5/06, James Bennett <[EMAIL PROTECTED]> wrote: > > On 9/5/06, limodou <[EMAIL PROTECTED]> wrote: > > So I think the later is more comfortable. But there is no automaticly > > authenticate in create_user, so for now, I must write like the former. > > As I said in the ticket (that was me, btw, not Adrian),
I'm sorry to Adrian, I don't know :P > I think your > second method of just calling 'login' should be fine -- if you've > just, within that request, created the user go ahead and call 'login' > and proceed from there. > No, the reason I submit a new ticket is django raise an error, it says that: Request Method: POST Request URL: http://localhost:8000/register/ Exception Type: AttributeError Exception Value: 'User' object has no attribute 'backend' Exception Location: C:\Python24\lib\site-packages\django-0.95-py2.4.egg\django\contrib\auth\__init__.py in login, line 53 So I checked the source of create_user and authenticate, and found in authenticate function, it'll assign a backend attribute to user after authenticate successfully, but create_user will not. So it's the problem I think. -- I like python! My Blog: http://www.donews.net/limodou UliPad Site: http://wiki.woodpecker.org.cn/moin/UliPad UliPad Maillist: http://groups.google.com/group/ulipad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" 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-developers -~----------~----~----~----~------~----~------~--~---
