I'm creating a new user/member and then want log that person in and
redirect them to their personalized page. I'm getting a " 'User'
object is unsubscriptable " error. All of the database records are
being created correctly, and I can go back to the site and manually
log the user in through my login page.
The relevant code snippet is below. Any help would be greatly
appreciated.
u = User.objects.create_user(request.POST['user_name'],
request.POST['email'],
request.POST['password'])
username = request.POST['user_name']
password = request.POST['password']
user = authenticate(username=username, password=password)
login(request, user)
return HttpResponseRedirect('/loginsuccess/')
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---