#807: request: move some session configuration into tg
--------------------------------+-------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: TurboGears | Version: 0.9a5
Severity: normal | Keywords:
--------------------------------+-------------------------------------------
i'd really like it if sessions were wrapped into tg a bit
this is soley so that we can put in app.cfg:
{{{
tg_session.automatic_lock = True
}}}
which will call
{{{
cherrypy.session.acquire_lock()
}}}
at the beginning of each reqest
why would we want that?
a_ since TG has all the AJAX support, tg is prone to runing into session
issues that caused cherrypy to add that feature in the first place. a
transparent automagic lock should mitigate most problems before they even
exist
b_ it instantiates the session lock so sessions can be addressed in custom
form validators , and elsewhere
I tried to figure out how to toss it into the code, but couldn't. If
someone can point me to the right module, where an autolcok could be
called ( it has to have access to the request ) i'll be happy to write it
- can't be more than 3 lines in the cfg and 2 lines in the right class
the current way to implement sessions is a bit awkward too , i think
wrapping more session info into tg would clarify it a bit ( right now
(based on newsgroup postings) i have a session dsn in my app.cfg, and my
controller sets the get_db() function on every request. thats really more
of a hack than a methodology. i tried to do this functionality myself for
3 hours today, and couldn't wrap it into tg in a clean way (maybe thats
why it doesn't exist?)
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/807>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Tickets" 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-tickets
-~----------~----~----~----~------~----~------~--~---