Re: django.contrib.auth 1.8 failed if user.pk not int

2015-10-14 Thread Petr Bondarenko
Yes. CharField(primary_key=True) When referring to RemoteApiUser._mata.pk returned this field. вторник, 13 октября 2015 г., 6:47:50 UTC+5 пользователь Tim Graham написал: > > In the traceback it appears that to_python() is being called for > AutoField, not CharField. Are you sure the custom user

Re: django.contrib.auth 1.8 failed if user.pk not int

2015-10-12 Thread Tim Graham
In the traceback it appears that to_python() is being called for AutoField, not CharField. Are you sure the custom user model with the CharField pk is properly configured? On Monday, October 12, 2015 at 7:03:25 AM UTC-7, Petr Bondarenko wrote: > > Apparently my problem is caused by the transitio

Re: django.contrib.auth 1.8 failed if user.pk not int

2015-10-12 Thread Petr Bondarenko
Apparently my problem is caused by the transition to a new Model._meta API. It was: request.session[SESSION_KEY] = user.pk It became: request.session[SESSION_KEY] = user._meta.pk.value_to_string(user) As user.pk we use access_token - CharField(max_length=64, primary_key=True) An error occurs in a

Re: django.contrib.auth 1.8 failed if user.pk not int

2015-10-09 Thread Tim Graham
Here's the commit and ticket: https://github.com/django/django/commit/0f7f5bc9 https://code.djangoproject.com/ticket/24161 I think you'll probably have to fix this in your app, but if a change in Django will help, let me know. Possibly your user model needs a CharField for its primary key. On

django.contrib.auth 1.8 failed if user.pk not int

2015-10-09 Thread Petr V. Bondarenko
Hi, when migrating code from version 1.7 to 1.8 I have a problem. We do not use standard authentication through ModelBackend. Authentication takes place on a different server protocol OAuth2. For the User, using fake-model RemoteApiUser. In which the primary key is *access_token*. Acces_token is w