#24161: Using UUIDField for id of custom User model prevents logging in
----------------------------------+-------------------------------------
Reporter: jamesbeith | Owner: nobody
Type: Bug | Status: new
Component: contrib.sessions | Version: 1.8alpha1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+-------------------------------------
Comment (by jamesbeith):
Replying to [comment:1 charettes]:
> Thanks for the example project. Could you also provide the full
traceback please.
{{{
Environment:
Request Method: POST
Request URL: http://127.0.0.1:8000/login/?next=/
Django Version: 1.8
Python Version: 3.4.2
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'myapp')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware')
Traceback:
File "/Users/James/.virtualenvs/uuid-user/lib/python3.4/site-
packages/django/core/handlers/base.py" in get_response
222. response = middleware_method(request, response)
File "/Users/James/.virtualenvs/uuid-user/lib/python3.4/site-
packages/django/contrib/sessions/middleware.py" in process_response
49. request.session.save()
File "/Users/James/.virtualenvs/uuid-user/lib/python3.4/site-
packages/django/contrib/sessions/backends/db.py" in save
58.
session_data=self.encode(self._get_session(no_load=must_create)),
File "/Users/James/.virtualenvs/uuid-user/lib/python3.4/site-
packages/django/contrib/sessions/backends/base.py" in encode
89. serialized = self.serializer().dumps(session_dict)
File "/Users/James/.virtualenvs/uuid-user/lib/python3.4/site-
packages/django/core/signing.py" in dumps
90. return json.dumps(obj, separators=(',',
':')).encode('latin-1')
File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/__init__.py"
in dumps
237. **kw).encode(obj)
File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/encoder.py"
in encode
192. chunks = self.iterencode(o, _one_shot=True)
File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/encoder.py"
in iterencode
250. return _iterencode(o, 0)
File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/json/encoder.py"
in default
173. raise TypeError(repr(o) + " is not JSON serializable")
Exception Type: TypeError at /login/
Exception Value: UUID('314cb5d6-593f-48f5-b1af-fadedde123d3') is not JSON
serializable
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24161#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.545de43b7906c2474dde26b894bf1947%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.