[PATCH] Re: [Myghty-users] routes and myghty
Brought to you by:
zzzeek
From: Jamie W. <ja...@sp...> - 2005-10-27 08:26:37
|
continuing the trend of talking to myself... This one time, at band camp, Jamie Wilkinson wrote: >What's the best way to change _get_controllers to just try to import the >class name given to the mapper? (Rather than just import it, I ask because >of line 127 which calls importer.filemodule()) I took the juicy bits out of ResolveModule, because that's pretty much the behaviour I was wanting (i.e. the controller attribute of the connect call refers to a ModuleComponent), and hacked up RoutesResolver, attached. So it's probably going to completely break all the paste stuff that relied on 'controller' referring to a filename with a _controller.py suffix. It also requires that you call create_regs on the routes mapper yourself, rather than leave it to the resolver (but I assume there's a way to pull out all the mappings? Maybe RoutesResolver should take a dictionary like ResolveModule did?) There's also a few lines where tabs were converted to 4-spaces. |