[Grok-dev] view-no-view Was: Grok 1.0 final?
janwijbrand at gmail.com
Thu Apr 16 03:06:10 EDT 2009
Martin Aspeli wrote:
> For the record, I need a view-with-no-rendering-at-all component. I want
> to be able to define a "utility" view that I can traverse to and invoke
> methods on from templates.
>> For backwards compatibility the first will keep the name "View" and the
>> latter will be called "CodeView".
> Sure. What will you call the one with no 'render' or default __call__? ;-)
(I vaguely remember you mentioned this before, can you point me to the
Not sure what mean to accomplish. Would it be something like this?
class Viewnoview(grok.Application, grok.Container):
pass # see app_templates/index.pt
from zope.interface import Interface
def __init__(self, context, request):
self.context = context
self.request = request
I'd like to note though that the mechanism for pagetemplates to be able
to "traverse" to "context/@@notreally" is more or less the same as going
to the URL "http://localhost/myapp/@@notreally".
In other words, I do not think it would be easy for Grok to have a
"view-ish" component available in ZPT paths, but not accessible through
But maybe this all has been discussed before in another thread...
More information about the Grok-dev