On Tue, Mar 30, 2010 at 1:03 PM, writes_on <[email protected]> wrote:
>
> Hi all,
>
> I'd like to create a sub-directory under controllers to help segregate
> controllers in my application, and I see that paster can do this by issuing
> this command:
>
> paster controller {directory_name}/{controller_name}
>
> where {directory_name} is the name of the sub-directory and
> {controller_name} is the name of the new controller. I'm confused how to
> construct a url to use this controller and place it in the routes.py file.
>
> Can someone help me out?

``map.connect(..., controller="directory_name/controller_name")``

If you want 'controller' to be a path variable, you'd have to write a
requirement regex that matches "identifier/identifier" with exactly
one slash and an identifier on both sides.

Don't forget .__init__.py in the subpackage.

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