On Mon, May 25, 2009 at 4:04 AM, Mike Orr <[email protected]> wrote:


> I assume the middle component is what you want to save or add, and
> that the action will know what to do with it.
>
> map.connect("panel", "/panel/{what}/{action}",
>    controller="panel_gallery")
>
> def  save(self, what):
>
> def add(self, what):
>
> You'll have to see how Pylons capitalizes controller names with "_" in
> them.  I'd assume "Panel_galleryController'.
>
> Note that this route will match any 3-component URL starting with
> "/panel", including any that you may have intended for other routes.
> As always, put the most specific routes first.
>

Thanks for your answers,

I think I explained my idea wrong ;-)

I want to have administration panel with different sections for managing
aspects of the user account (like gallery section, overall settings,
guestbook entries and so on) and I thought that the best idea is to have
different controllers for handling each section (similarly as I have
different controller for managing i.e guestbook and gallery).

the solution given by Tomasz Narloch was to use:

map.connect('/panel/overall/{action}/{id}', controller='panel/overall',
action='index', id=None, _minimize=True)

seems to do the trick (thoughI haven't tried that yet, will do that
tonight), I assume I should manually add entries for all my panel secions
like::

# for gallery management
map.connect('/panel/gallery/{action}/{id}', controller='panel/gallery',
id=None, _minimize=True)

# for guestbook management
map.connect('/panel/guestbook/{action}/{id}', controller='panel/gallery',
id=None, _minimize=True)

I was thinking if it is possible to accomplish the same automatically.

Best regards
C

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