Karen,
Thanks for the reply.  I looked at the traceback, but it didn't help a
whole lot.  It pointed me in the direction of the login function in
django.contrib.auth.views.  I ended up taking the authentication and
login snippet from above and moving it to another view that I created,
calling that view from the member registration view.  That fixed the
problem (although I don't know why!).

Here's what I did:

members.py:
...
u = User.objects.create_user(request.POST['user_name'],
                          request.POST['email'],
                          request.POST['password'])

               user_login_validate(request)
               return HttpResponseRedirect('/loginsuccess/')
...


views.py:
...
def user_login_validate(request):
        username = request.POST['user_name']
        password = request.POST['password']
        user = authenticate(username=username, password=password)

        if user is not None:
            if user.is_active:
                login(request, user)
            else:
                return render_to_response('login.html')

Also curiously, the redirect would not work from within
user_login_validate, so I moved it back to the original view and it
worked.  This Django stuff sure can be maddening at times!

On Oct 10, 10:16 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On 10/10/07, JimR <[EMAIL PROTECTED]> wrote:
>
>
>
> > Any Suggestions?
>
> The traceback from the error you are seeing might help people figure out
> where the problem lies.
>
> Karen


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

Reply via email to