Am 27.12.2010 17:20 schrieb Daniel Fetchinson:
In the tg1.1 code I used Visits and now I've come across
http://docs.turbogears.org/1.5/VisitBasedSessions which kinda makes me
feel I need to add sessions.py as described. I'm using sqlobject by
the way.

That wiki page actually assumed SQLAlchemy, but I have added the necessary code for SQLObject now as well (see last section).

> Now the question is whether I really need this sessions.py file? The
reason the whole issue came up is that whenever I access any URL I get
the traceback

For using CherryPy 3 sessions, you don't need the sessions.py file posted on that wiki page. Just set tools.sessions.on = True and
tools.sessions.storage_type = 'ram' or 'file' and you're ready to go.

Only if you want to store your session data in the visit table, you
need the sessions.py file. Import it anywhere in your project to activate it.

After looking around it turns out get('timeout', '20') at line 164 in
turbogears/visit/api.py is a dict, the entire configuration dict from
config/app.cfg. Is this normal?

No, this should not happen. Something seems to be wrong with your config. If you paste it somewhere or send it to me via mail I'll check.

> Is this the reason I need sessions.py from the VisitBasedSessions docs?

No, standard CherryPy sessions should work by just activating them in the config.

-- Christoph

--
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en.

Reply via email to