Interesting.  I was reading the documentation but couldn't find a good
way of doing the following:  I don't these controllers to sit under
the controller directory, but rather a directory level down under
controllers/site.  I see that routes already does this:

map = Mapper(directory=os.path.join(root_path, 'controllers'))


But the call only returns 1 mapper - map.  How do I tell my connect
method to look one directory deeper for some of the connects that I
do?

Thanks,

Sam.



On Jul 19, 3:36 pm, Ben Bangert <[EMAIL PROTECTED]> wrote:
> On Jul 19, 2007, at 2:52 PM, SamDonaldson wrote:
>
>
>
> > But now, for the following url string, I want the following standard
> > url string:
>
> >www.blah.com/<controller>?params1=1&params2=2....
>
> > For the above standard url string, I want the controller to be the
> > wildcard that takes a controller name and then I want the action to be
> > something that's constant like 'run'.  Basically, I don't want the
> > design where I keep adding more actions into a controller.  I want my
> > controller to inherit the base controller class and call run 'run'
> > method to take care of the request.  I currently have:
>
> > map.connect(':controller/*', controller=':controller', action='run')
>
> > As you can see, I"m trying to make my route point to the controller
> > that was passed in and then hardcode the action to 'run' which each
> > controller file will define.
>
> > How can I acheive this wildcarding etc.. in routes?
>
> With the wildcard option:http://routes.groovie.org/manual.html#route-path
>
> Just have:
> map.connect(':controller/*url', action='run', url=None)
>
> Your run action will always be called, doesn't need a url on the end
> (take away the default if you want it), and it'll match anything
> after the controller name.
>
> Cheers,
> Ben
>
>  smime.p7s
> 3KDownload


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to