[Grok-dev] Multiple Model Issue

Brandon Craig Rhodes brandon at rhodesmill.org
Fri Oct 31 15:58:33 EDT 2008


Tim Cook <timothywayne.cook at gmail.com> writes:

> ---------------------------------------------
> import grok
>
> from q.w.e import B  # class B inherits from grok.Model
>
> class A(grok.Application,grok.Container):
>    pass
>
> class Index(grok.View):
>    pass
>
>
> class BIndex(grok.View):
>    grok.context(B)
>    grok.template('bindex')  # though this should be automatic?
> ---------------------------------------------
>
> In the app_templates folder I have:
>
> index.pt and bindex.pt
>
> the url http://localhost:8080/a  works as expected.
>
> the url http://localhost:8080/a/bindex gives me a Zope error:
> The page that you are trying to access is not available

Umm... that's because a bindex wraps b's, not a's, right?  The URL that
should work would be:

http://localhost:8080/b/bindex

-- 
Brandon Craig Rhodes   brandon at rhodesmill.org   http://rhodesmill.org/brandon


More information about the Grok-dev mailing list