Bostjan Kaluza schrieb:
> Hi,
> 
> I solved the problem, but I do not understand why it works now.
> In UserController:
> ---
> class Root(controllers.RootController):
>        @expose()
>        def index(self, *args, **kw):
>                raise redirect('/user')
> 
>        user  = UserController()
> ---
> class UserController(identity.SecureResource):
>        @expose(template="myproject.templates.user.index")
>        def index(self):
>                return dict(hello="Hello world")
> ---
> I replaced "UserController(identity.SecureResource):" with
> "UserController(controllers.RootController):".

Because SecureResource is only a mixin for security. But a controller 
needs to be subclassed by (Root)Controller. But Python knows multiple 
inheritance, so you could subclass from both.

Diez

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