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

2011-06-06 Thread Tom Evans
On Sat, Jun 4, 2011 at 3:27 AM, Jimmy wrote: > I'm new to Django and not quite understand your explanation. > > How can I create a specific session_key, and access to the session by > that key? Any risk that I have if I expose the session_key to the > outside? > > Thank you. > > Best regards, > Li

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

2011-06-03 Thread Jimmy
I'm new to Django and not quite understand your explanation. How can I create a specific session_key, and access to the session by that key? Any risk that I have if I expose the session_key to the outside? Thank you. Best regards, Li Jiaming On May 31, 7:47 pm, Tom Evans wrote: > On Sat, May 2

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

2011-05-31 Thread Tom Evans
On Sat, May 28, 2011 at 4:00 AM, Jimmy wrote: > 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"

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

2011-05-27 Thread Jimmy
btw, I use Django-1.3. Is this a bug? On May 28, 11:00 am, Jimmy wrote: > 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

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

2011-05-27 Thread Jimmy
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 'a6e020a64789b5644e923c