Friday, May 27, 2011

Why self-defined session_key got changed when save in DB?

Hi,

I have following code to set self-defined session_key:

>>> from django.contrib.sessions.backends.db import SessionStore
>>> from django.contrib.sessions.models import Session
>>> a = SessionStore(session_key="fwefwejfo3j20jf02jnfweojfeo")
>>> a.save()
>>> a.session_key
'a6e020a64789b5644e923c85b80a1d0b'

Why the session_key got changed after saved in DB? Where is my defined
session_key?


--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment