This is now fixed in trunk, please give it a try.

On Sep 3, 2:03 pm, Bottiger <[email protected]> wrote:
> Ok I think I found out the problem.
>
> response.cookies = Storage().
>
> I think this is supposed to be Cookie.SimpleCookie() because a cookie
> object allows doing the following code without error.
>
> response.session_id = '%s:%s' % (record_id, unique_key)
>         response.cookies[response.session_id_name] =
> response.session_id
>         response.cookies[response.session_id_name]['path'] = '/'
>
> Otherwise you would be assigning a string to a string. With
> SimpleCookie, the string response.session_id is wrapped in a "morsel"
> object which has a path attribute.
>
> On Sep 3, 11:39 am, Bottiger <[email protected]> wrote:
>
> > It worked when I commented out that line. I would like to store
> > sessions in database though.
>
> > On Sep 3, 6:10 am, mdipierro <[email protected]> wrote:
>
> > > As a test, can you try commenting the line
> > >    session.connect(request, response, db)
> > > in your model?
>
> > > Massimo
>
> > > On Sep 2, 10:19 pm, Bottiger <[email protected]> wrote:
>
> > > > Executing shell has stopped working for me. It now displays this error
> > > > in the console:
>
> > > > Traceback (most recent call last):
> > > >   File "C:\Users\admin\Desktop\web2py\gluon\restricted.py", line 178,
> > > > in restricted
> > > >     exec ccode in environment
> > > >   File "applications\cas\models/db.py", line 34, in <module>
> > > >     session.connect(request, response, db)
> > > >   File "C:\Users\admin\Desktop\web2py\gluon\globals.py", line 320, in
> > > > connect
> > > >     response.cookies[response.session_id_name]['path'] = '/'
> > > > TypeError: 'str' object does not support item assignment
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to