Only the root controllers needs to inherit BaseController.
The subcontrollers can inherit object.

Actually, in a previous version of TG 2 (apparently not in tg2.1b1), the
quickstart templates add a "Controller" class in base.py, which could be :

class Controller(object):
    pass

I guess that is why the documentation mismatch your quickstarted project.

Regards,

Christophe

2010/3/5 Mengu <[email protected]>

> if i'm not wrong you don't have to import Controller and use it for
> your subcontroller.
>
> class MovieController(BaseController):
>     .. operations
>
> class RootController(BaseController):
>    movie = MovieController()
>    .. operations
>
> would be enough.
>
> On 4 Mart, 05:26, coelacanth <[email protected]> wrote:
> > Hello. I'm fairly new to TurboGears, please don't get mad even if I
> > ask you some stupid questions. 8^)
> >
> > So far, I have managed to get the RootController working. I can get
> > access to the preexisting database and fetch some desired data out of
> > it.
> >
> > http://turbogears.org/2.0/docs/main/Controllers.html
> >
> > At present, I'm reading this document regarding the use of
> > subcontrollers and url hierarchies. I'm stuck on the very first line
> > though.
> >
> > from jimmystest.lib.base import BaseController, Controller (from
> > controllers/root.py)
> >
> > It doesn't seem that I can import Controller (I can import
> > BaseController of course).
> >
> > I'm running TurboGears 2 (lib/python2.6/site-packages/
> > TurboGears2-2.1b1-py2.6.egg), just wondering if the doc is out-of-date
> > or more likely, I've done something stupid.
> >
> > Thanks a lot in advance.
>
> --
> 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]<turbogears%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/turbogears?hl=en.
>
>

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