Hi,

When running this, I get a "NoneType has no attribute
is_authenticated()" error, and I cannot understand why:

1 new_user = User.objects.create_user(username, "your.email",
password)
2 new_user.is_active = False
3 new_user.save()
4 user = authenticate(username = new_user.username, password =
new_user.password) # See http://code.djangoproject.org/ticket/2656
5 if user.is_authenticated():   # The error is produced here.
    login(request, user)

Why does authenticate() in line 4 return a None object instead of a
user?

Thanks for your help,

Mathieu


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