iain duncan <[EMAIL PROTECTED]> writes:

> I put my admin subcontroller in a package called ( originally enough )
> subcontrollers. It inherits from controllers.Controller and it's called
> AdminController. My root controller now starts like this:
>
> from subcontrollers.admin import AdminController
>
> class Root(controllers.RootController):
>    admin = AdminController()
>
>    etc etc     
>
>
>
> Everything imports ok, and the server starts up fine. But, I can't
> figure out how to get an http request to call the admin() method in the
> admin controller. I want the url /admin to call it. I tried naming it
> admin, and I tried naming it index. But when I hit /admin, instead it
> falls through to the default method of my root controller. Can anyone
> tell me what I'm missing here? I'm sure it's painfully obvious but my
> sleep head is not finding it. :/

>From this code there's nothing wrong so far.  

Show us your "admin" code.

Just to get a bit ahead of you, here's a skeleton of what I use:

================================================================================
class AtualizarCadastro(controllers.Controller):

    @expose(template="genshi:usuarios.templates.atualizar_cadastro_usuarios")
    @identity.require(
        identity.Any(
        identity.in_any_group('admin'),
        identity.has_any_permission('admin', 'atualizar')))
    def index(self, **kwords):
        # ...
================================================================================


-- 
Jorge Godoy      <[EMAIL PROTECTED]>

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