1

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?

Giacomo Spettoli
  • 4,476
  • 1
  • 16
  • 24
Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435

2 Answers2

2

"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:

Giacomo Spettoli
  • 4,476
  • 1
  • 16
  • 24
-1
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

j23d
  • 48
  • 3