Question

If I try

  grok.templatedir("../browser/templates")

I get

  GrokImportError: The 'templatedir' directive can not contain path separator.

What's the correct way to set five.grok template directory to an absolute path?

Was it helpful?

Solution

"grok.templatedir(directory) - directory - the name of the directory inside the same package as the module"

I fear that at the moment there isn't a correct way, indeed there is no way.

There is a pending bug about this and eventually there will be a refactoring.

More info:

OTHER TIPS

In [1]: from os.path import dirname, join
In [2]: import zopeskel.basic_zope
In [3]: join(dirname(zopeskel.basic_zope.__file__))
Out[3]: '/usr/local/lib/python2.6/dist-packages/ZopeSkel-2.19-py2.6.egg/zopeskel'

but - I dunno if this is the correct way.

best, marco

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top