I upgraded python to 2.6.8 today from an earlier 2.6, what an
adventure! So much bizarre happenings so many places. Tonight's
special:

SomeModel.objects.get(sometextfield=sometext) always works (when there
is one entry where sometextfield=sometext of course).

auth.User.objects.get(username=sometext) works only *sometimes*.

In a login-view, I first check that the user for a given username
exists. It does! User found. Then I try to authenticate:
auth.authenticate(user.username, password). That never works!
Monkeypatching authenticate() shows that the
User.objects.get(username=username) in it always returns
User.DoesNotExist. But of course:
User.objects.filter(username__startswith=username).get(username__endswith=username)
always return the user in question. And the only thing that has
changed is the minor python version.

I can't get User.objects.get(username=whatever) to work in the shell either.

How do I debug this further? This is for django 1.3, I need to have
this working predictably again before I can upgrade to 1.4. I have
logs of the sql if that'll help but the sql looks fine.


HM

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to