{"action":"created","issue":{"url":"https://api.github.com/repos/crits/crits/issues/720","repository_url":"https://api.github.com/repos/crits/crits","labels_url":"https://api.github.com/repos/crits/crits/issues/720/labels{/name}","comments_url":"https://api.github.com/repos/crits/crits/issues/720/comments","events_url":"https://api.github.com/repos/crits/crits/issues/720/events","html_url":"https://github.com/crits/crits/issues/720","id":141688662,"number":720,"title":"Login SESSION_KEY:  value must be an integer","user":{"login":"thelok","id":5578984,"avatar_url":"https://avatars.githubusercontent.com/u/5578984?v=3","gravatar_id":"","url":"https://api.github.com/users/thelok","html_url":"https://github.com/thelok","followers_url":"https://api.github.com/users/thelok/followers","following_url":"https://api.github.com/users/thelok/following{/other_user}","gists_url":"https://api.github.com/users/thelok/gists{/gist_id}","starred_url":"https://api.github.com/users/thelok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelok/subscriptions","organizations_url":"https://api.github.com/users/thelok/orgs","repos_url":"https://api.github.com/users/thelok/repos","events_url":"https://api.github.com/users/thelok/events{/privacy}","received_events_url":"https://api.github.com/users/thelok/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2016-03-17T19:46:55Z","updated_at":"2016-03-17T20:34:55Z","closed_at":null,"body":"Installed Django 1.8.11. Trying to login to CRITs with a remote user yields the following 500 error related to SESSION_KEYs:\r\n\r\n```\r\n[Thu Mar 17 15:14:50 2016] [error] [client ...]   File \".../lib/python2.7/site-packages/django/contrib/auth/__init__.py\", line 59, in _get_user_session_key\r\n[Thu Mar 17 15:14:50 2016] [error] [client ...]     return get_user_model()._meta.pk.to_python(request.session[SESSION_KEY])\r\n[Thu Mar 17 15:14:50 2016] [error] [client ...]   File \".../lib/python2.7/site-packages/django/db/models/fields/__init__.py\", line 969, in to_python\r\n[Thu Mar 17 15:14:50 2016] [error] [client ...]     params={'value': value},\r\n[Thu Mar 17 15:14:50 2016] [error] [client ...] ValidationError: [u\"'521238e4550671234123c1' value must be an integer.\"]\r\n```\r\n\r\nI see a bunch of comments in core/user.py and core/handlers.py and some changes in settings.py with the middleware stuff in addition to a custom middleware class in user.py.\r\n\r\nTried making a bunch of permutations and fiddling with the MIDDLEWARE_CLASSES but nothing seems to work.\r\n\r\nIs there no workaround right now because of mongoengine?\r\n\r\nhttps://github.com/crits/crits/blob/master/crits/core/handlers.py#L3363"},"comment":{"url":"https://api.github.com/repos/crits/crits/issues/comments/198070503","html_url":"https://github.com/crits/crits/issues/720#issuecomment-198070503","issue_url":"https://api.github.com/repos/crits/crits/issues/720","id":198070503,"user":{"login":"thelok","id":5578984,"avatar_url":"https://avatars.githubusercontent.com/u/5578984?v=3","gravatar_id":"","url":"https://api.github.com/users/thelok","html_url":"https://github.com/thelok","followers_url":"https://api.github.com/users/thelok/followers","following_url":"https://api.github.com/users/thelok/following{/other_user}","gists_url":"https://api.github.com/users/thelok/gists{/gist_id}","starred_url":"https://api.github.com/users/thelok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelok/subscriptions","organizations_url":"https://api.github.com/users/thelok/orgs","repos_url":"https://api.github.com/users/thelok/repos","events_url":"https://api.github.com/users/thelok/events{/privacy}","received_events_url":"https://api.github.com/users/thelok/received_events","type":"User","site_admin":false},"created_at":"2016-03-17T20:34:55Z","updated_at":"2016-03-17T20:34:55Z","body":"Source code helps https://github.com/django/django/blob/stable/1.8.x/django/contrib/auth/middleware.py"}}