[Grok-dev] overridding default form templates
Joshua Immanuel
josh at hipro.co.in
Wed Sep 12 07:00:01 UTC 2012
Hello,
On Tue, 2012-09-11 at 18:50 +0530, Joshua Immanuel wrote:
> I was trying to override the default form template for grok.AddForm
> using grok.PageTemplateFile
> ...
>
> In the overridden template file I was using a macro to fill a slot
> with form contents.
> ...
> But, while rendering this page I get the following traceback
> ...
> > File
> "/opt/buildout/eggs/zope.tal-3.5.2-py2.7.egg/zope/tal/taldefs.py",
> line 172, in getProgramVersion
> > if (len(program) >= 2 and
> > TypeError: object of type 'Macro' has no len()
>
To further debug this, I changed the buildout.cfg to use the grok 1.4.1
release
extends = http://grok.zope.org/releaseinfo/1.4.1/versions.cfg
and I removed the package grokcore.chameleon from 'install_requires' of
setup.py
Then I changed the macro access path expression from
metal:use-macro=
"path:context/@@dashboard/template/macros/dashboard_layout">
to
metal:use-macro=
"context/@@dashboard/macros/dashboard_layout">
Now, my extended form template renders properly inside my custom layout
macros. Can someone point me to the problem?
--
Joshua Immanuel
HiPro IT Solutions Private Limited
http://hipro.co.in
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://mail.zope.org/pipermail/grok-dev/attachments/20120912/32701561/attachment.sig>
More information about the Grok-dev
mailing list