On Jun 28, 2007, at 8:52 PM, Mike Orr wrote:
>
> On 6/28/07, Jonathan LaCour <[EMAIL PROTECTED]> wrote:
>> 3. Either some middleware or just a few lines inside the
>> BaseController
>> of the TurboGears template that starts a transaction on every
>> request and puts it into the transaction manager.
>>
>> And, in my opinion, items #1 and #2 should be in Pylons by
>> default, and
>> the third item should be in the TurboGears template by default.
>
> ... and available to non-TG Pylons applications. The @transactional
> decorator sounds like a good idea, possibly with a False flag if the
> default is transactional.
>
> This is a good point to ask, how will the TG template differ from the
> standard Pylons template? Will there be a base controller, or at what
> point will they diverge? Where will CherryPy-style dispatching be
> implemented? I imagine you will override PylonsApp and/or
> PylonsBaseWSGIApp in pylons.wsgiapp, no?
The dispatching is currently implemented in a "route" method in a
PylonsWSGIController subclass. There's a route defined like:
map.connect('*url', controller='root', action='route')
That handles it url to further dispatch it, cherrypy style. Here's
all the meat:
http://trac.turbogears.org/browser/trunk/tg/controllers.py#L58
Alberto
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---