I think you could have Comic as a subcontroller of Root with a method  view:

class Comic(Controller):

    @expose(...)
    def view(self, comicName=None):
        """ Use comicName to find the correct comic. """
        return dict(...)

class Root(RootController):

    comic = Comic()

-Ian

On 2/8/07, Mikkel Høgh <[EMAIL PROTECTED]> wrote:
>
> Hi fellow TurboGeeks,
>
> I have been working on a small webcomic aggregator in TurboGears, and
> I've made good progress so far (The project page is at 
> https://launchpad.net/parade
> and the code can be found at https://launchpad.net/~mikl/+branch/
> parade/parade.dev (Bazaar-NG repository - if you have bzr installed,
> you can just do a bzr branch with the URI above))
>
> The only problem I have is that I cannot seem to remember the finer
> details of TurboGears controllers, and I cannot seem to find the
> documentation that I need...
>
> I want to use the /controller/action/id paradigm for URIs in my
> project, so that /comic/view/userfriendly does just that.
> So, how to proceed?
> 1) Is it enough to just create a new controller named Comic and have a
> method in that called view?
> 2) How do you pass the last bit of the URI as an argument to the
> function?
>
> I hope some of you will be able to enlighten me :)
>
> Kind regards,
> Mikkel Høgh
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to