Hello i can't authenticate user

I have crete the user with:

def create_user(request

    us = request.POST['username']
    ml = request.POST['email']
    passw = request.POST['password']
    User.objects.create_user(us, ml, passw)

   return......................

I see the user in the database

than i need to autenticate for the login

def check_user(request):
    email = request.POST.get('email')
    username = request.POST.get('username')
    password = request.POST.get('password')
    user = authenticate(username=username, password=password, email=email)
    if user is not None:
        login(request, user)
        return redirect('aabb')
    else:
        return ..............

but i never get the user object, user and password are correct

Can you help me

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0295bf65-6cfc-4614-9476-799589d507e7%40googlegroups.com.

Reply via email to