[Grok-dev] Template directories

Peter Bengtsson peter at fry-it.com
Wed Jun 25 08:48:56 EDT 2008

I like the idea of putting ALL templates for all models in a hard
directory called "templates" a LOT.
But why would master.pt not belong to templates/app/ ?? It's not a
view that is part of the project, it's part of the app.

I'm working on a tiny project that already has app_templates,
foo_templates and bar_templates.
The most annoying thing is tab completion, since I start typing app
followed by TAB and then have to supply the rest every time.

2008/6/25 Tim Terlegård <tim.terlegard at valentinewebsystems.se>:
> I wonder what people think about the current directory layout for templates.
> What about adding a global template directory?
> First idea:
>  templates/master.pt
>  app_templates/index.pt
>  app_templates/...
> Second idea:
>  templates/app/index.pt
>  templates/app/...
>  templates/master.pt
> A global template directory is useful when you have for instance a master.pt
> that is referred to from any module. For small applications it might also be
> overkill with a bunch of <module>_templates directories with one or two
> templates in each. It would be nice if I could put my templates in a global
> template directory if I want to.
> When a template is looked up caused by a grok.template() directive,
> it could first look inside <module>_templates if it exists, if it's not
> there
> it could check the global templates directory.
> Any thoughts on this?
> /Tim
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev

Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com

More information about the Grok-dev mailing list