[Grok-dev] generic directoryresource in grokcore.view

Jan-Wijbrand Kolman janwijbrand at gmail.com
Fri Oct 17 02:34:13 EDT 2008

Kevin Teague wrote:
> Hmm, is there an easy way to use page templates located in
> DirectoryResources using grok.PageTemplate? Or is this something that
> could be added?
> For example, I have a 'resources' DirectoryResource with a template
> named 'my_custom_edit.pt', then in an edit form I want to write:
> class Edit(grok.EditForm):
>     ... regular form stuff ...
>     template = grok.PageTemplate(???) # I want to use the '/@@/
> resources/my_custom_edit.pt' template here

I'm not sure what you want to achieve here. The DirectoryResource is
purely a slightly more general form of the directory resources that Grok
makes available through the static attribute - the static attribute on a
view class is nothing more than a lookup for such a *particular"

I guess, if that's what you want, you could mimic how the static
attribute is put on the view class for whatever

kind regards,

More information about the Grok-dev mailing list