Previously Mike Orr wrote: > The most difficult problem seems to be controllers, and the > 'controller_scan' argument in Routes which seems useless. (We had to > hardcode the controllers in our GUI BILS app because of some > incompatibility with py2exe.) Several people have asked how to have > controllers in various packages and then pull in a selection of them. > The simplest method is stub modules in the controllers directory that > import the actual controllers. But maybe we can find something more > flexible.
If you decide to use zope.component a controller could be a named utility. You could then register it like so: class BaseController(object): """This is the standard Pylons base controller class.""" implements(IPylonsController) class MyController(BaseController): """My very own controller.""" registerUtility(MyController, name="my_controller") and Pylons could get a list of all utilities using something like this: controllers = getUtilitiesFor(IPylonsController) This prevents the need to skin directories as currently happens, and will allow you to put your controllers anywhere you want. You can also selectively do the registerUtility calls, override already registered controllers or remove controller registrations. Wichert. -- Wichert Akkerman <wich...@wiggy.net> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. --~--~---------~--~----~------------~-------~--~----~ 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 pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---