Successful use of ZPT and macros in Python Product?
Successful use of ZPT and macros in Python Product? ..., has anybody seen that?
At 19:27 2002-05-03 +0200, Dieter Maurer wrote:
Peter Bengtsson writes:
Successful use of ZPT and macros in Python Product? ..., has anybody seen that? Would you accept CMF as an example?
Not sure of the difference between the way you use them in CMF and the way you use them in regular python products. If it is the same then, I vaguely remember that this Plone thing might be the one. All my little .zpt files start with <html metal:use-macro="here/StandardLook/macros/standard"> and this doesn't work unless StandardLook has once been visited.
Peter Bengtsson writes:
... All my little .zpt files start with <html metal:use-macro="here/StandardLook/macros/standard"> and this doesn't work unless StandardLook has once been visited. I remember this has been a bug in earlier ZPT versions.
I used ZPT in a product and did not experience this problem. However, meanwhile, we moved the product to CMF. The original product is not used since about 1/2 a year... Dieter
At 22:09 2002-05-05 +0200, you wrote:
Peter Bengtsson writes:
... All my little .zpt files start with <html metal:use-macro="here/StandardLook/macros/standard"> and this doesn't work unless StandardLook has once been visited. I remember this has been a bug in earlier ZPT versions.
I used ZPT in a product and did not experience this problem. However, meanwhile, we moved the product to CMF. The original product is not used since about 1/2 a year...
...but you had something like:: metal:use-macro="here/StandardLook/macros/standard" Any chance I can have a look at that product? What I need to do now each time I refresh my product is to refresh http://localhost:8080/<myinstance>/StandardLook If not, I get the attached error message:: Undefined Sorry, a site error occurred. Traceback (innermost last): File C:\Program\zope240_2\lib\python\ZPublisher\Publish.py, line 223, in publish_module File C:\Program\zope240_2\lib\python\ZPublisher\Publish.py, line 187, in publish File C:\Program\zope240_2\lib\python\Zope\__init__.py, line 226, in zpublisher_exception_hook (Object: LockableItem) File C:\Program\zope240_2\lib\python\ZPublisher\Publish.py, line 171, in publish File C:\Program\zope240_2\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: index_html) File C:\Program\zope240_2\lib\python\ZPublisher\Publish.py, line 112, in call_object (Object: index_html) File C:\Program\zope240_2\lib\python\Shared\DC\Scripts\Bindings.py, line 324, in __call__ (Object: index_html) File C:\Program\zope240_2\lib\python\Shared\DC\Scripts\Bindings.py, line 354, in _bindAndExec (Object: index_html) File C:\Program\zope240_2\lib\python\Products\PageTemplates\PageTemplateFile.py, line 163, in _exec (Object: index_html) File C:\Program\zope240_2\lib\python\Products\PageTemplates\PageTemplate.py, line 156, in pt_render (Object: index_html) (Info: {'container': <IssueTracker instance at 01417130>, 'here': <IssueTracker instance at 01417130>, 'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter [THE REQUEST STUFF] File C:\Program\zope240_2\lib\python\TAL\TALInterpreter.py, line 229, in __call__ File C:\Program\zope240_2\lib\python\TAL\TALInterpreter.py, line 262, in interpret File C:\Program\zope240_2\lib\python\TAL\TALInterpreter.py, line 581, in do_useMacro File C:\Program\zope240_2\lib\python\Products\PageTemplates\Expressions.py, line 198, in _eval (Info: here) File C:\Program\zope240_2\lib\python\Products\PageTemplates\Expressions.py, line 336, in restrictedTraverse (Object: LockableItem) (Info: (['StandardLook', 'macros', 'standard'], 1)) Undefined: Sorry, an error occurred
Peter Bengtsson writes:
At 22:09 2002-05-05 +0200, you wrote:
Peter Bengtsson writes:
... All my little .zpt files start with <html metal:use-macro="here/StandardLook/macros/standard"> and this doesn't work unless StandardLook has once been visited. I remember this has been a bug in earlier ZPT versions.
I used ZPT in a product and did not experience this problem. However, meanwhile, we moved the product to CMF. The original product is not used since about 1/2 a year...
...but you had something like::
metal:use-macro="here/StandardLook/macros/standard" I did.
Any chance I can have a look at that product? Unfortunately no.
In your other problem report (about annoying ambiguous ...), I saw you are using Zope 2.4.0. I think, you should upgrade. Earlier PageTemplate releases did not have the "_setName" method... Upgrading will probably also remove the problem, you describe here. Dieter
participants (2)
-
Dieter Maurer -
Peter Bengtsson