On Fri, Jun 13, 2008 at 6:53 AM, askel <[EMAIL PROTECTED]> wrote:
>
> -jj,
>
> Isn't that enforced by Routes that controllers must be classes? I
> remember some discussion about possibility of using any other
> dispatching library/method in Pylons. It was something about new WSGI
> environment key "wsgiorg.routing_args". I might be completely wrong on
> that though.
>
> Cheers
> Alexander

Pylons requires controllers to live in a certain directory and have a
certain name.  But the controller "class" can be a WSGI function.

routing.py tells Routes to allow only controllers that exist in a
certain directory:

    map = Mapper(directory=config['pylons.paths']['controllers'],
                 always_scan=config['debug'])

wsgiorg.routing_args contains the routing variables.  The wsgiorg spec
(http://www.wsgi.org/wsgi/Specifications/routing_args) mentions only
"named routing args", but not any particular names like "controller".

You can override pylons.wsgiapp.PylonsApp.find_controller() to look
for controllers elsewhere.

Routes 2 will eliminate the controller constraint because that's not
really Routes' job.  There will likely be an option to specify that
certain routing vars must be present and true ('controller' and
'action' for Pylons, 'controller' for TG 2 or generic WSGI
controllers).  We're also considering a connect option to dispatch
directly to a WSGI app without a controller.

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to