Hi all,
Can anybody tell me how can i add resource by using z3c.pt. i know how to
add it by using zope.pagetemplate, i tried it and it was working well. The
following is the code i am working with and it was not working with z3c.pt
*configure.zcml:-
.
.
* *
* *
.
.
.
resizing_font.pt :-
**
*
This is a test :)
*
resizing_font.py :-
*from z3c.pt.pagetemplate import ViewPageTemplateFile*
*class ResizingFont(FormBase):
template = NamedTemplate('tatr_css_js.form')
form_fields=[]
def __init__(self,context,request):
self.request=request
self.context=context
form_template = NamedTemplateImplementation(
ViewPageTemplateFile('resizing_font.pt'))
*While running with this code i am getting the error
*2008-10-14T06:14:36 ERROR SiteError
http://192.168.0.43:8080/resizing_font.html
Traceback (most recent call last):
File "/home/z3.4/lib/python/zope/publisher/publish.py", line 133, in
publish
result = publication.callObject(request, obj)
File "/home/z3.4/lib/python/zope/app/publication/zopepublication.py", line
167, in callObject
return mapply(ob, request.getPositionalArguments(), request)
File "/home/z3.4/lib/python/zope/publisher/publish.py", line 108, in
mapply
return debug_call(obj, args)
- __traceback_info__:
File "/home/z3.4/lib/python/zope/publisher/publish.py", line 114, in
debug_call
return obj(*args)
File "/home/z3.4/lib/python/zope/formlib/form.py", line 774, in __call__
return self.render()
File "/home/z3.4/lib/python/zope/formlib/form.py", line 768, in render
self.form_result = self.template()
File "/home/z3.4/lib/python/z3c/pt/pagetemplate.py", line 40, in render
return template.render(**parameters)
File "/home/z3.4/lib/python/chameleon/zpt/template.py", line 51, in render
return super(PageTemplateFile, self).render(**kwargs)
File "/home/z3.4/lib/python/chameleon/core/template.py", line 156, in
render
return super(TemplateFile, self).render(**kwargs)
File "/home/z3.4/lib/python/chameleon/core/template.py", line 62, in
render
template = self.cook_check(parameters=kwargs)
File "/home/z3.4/lib/python/chameleon/core/template.py", line 152, in
cook_check
return Template.cook_check(self, **kwargs)
File "/home/z3.4/lib/python/chameleon/core/template.py", line 57, in
cook_check
template = self.cook(parameters=parameters, **kwargs)
File "/home/z3.4/lib/python/chameleon/core/template.py", line 138, in cook
template = self.compiler(**kwargs)
File "/home/z3.4/lib/python/chameleon/core/translation.py", line 597, in
__call__
self.root.start(stream)
File "/home/z3.4/lib/python/chameleon/core/translation.py", line 438, in
startself.node.visit()
File "/home/z3.4/lib/python/chameleon/core/translation.py", line 107, in
visitself.body()
File "/home/z3.4/lib/python/chameleon/core/translation.py", line 92, in
body
element.node.visit()
File "/home/z3.4/lib/python/chameleon/core/translation.py", line 107, in
visitself.body()
File "/home/z3.4/lib/python/chameleon/core/translation.py", line 92, in
body
element.node.visit()
File "/home/z3.4/lib/python/chameleon/core/translation.py", line 107, in
visitself.body()
File "/home/z3.4/lib/python/chameleon/core/translation.py", line 92, in
body
element.node.visit()
File "/home/z3.4/lib/python/chameleon/core/translation.py", line 106, in
visitself.begin()
File "/home/z3.4/lib/python/chameleon/core/translation.py", line 72, in
begin
self.stream.begin(self.serialize())
File "/home/z3.4/lib/python/chameleon/core/translation.py", line 174, in
serialize
dynamic_attrs = self.dynamic_attributes or ()
File "/home/z3.4/lib/python/chameleon/zpt/language.py", line 74, in
dynamic_attributes
if self.element.tal_attributes is not None:
File "/home/z3.4/lib/python/chameleon/core/utils.py", line 52, in get
return f(value)
File "/home/z3.4/lib/python/chameleon/zpt/expressions.py", line 236, in
definitions
raise e
SyntaxError: Not a valid path-expression.
192.168.0.43 - - [14/Oct/2008:06:14:36 +] "GET /resizing_font.html
HTTP/1.1" 500 84 "http://192.168.0.43:8080/"; "Mozilla/5.0 (X11; U; Linux
i686; en-US; rv:1.8.1.16) Gecko/20080702
Iceweasel/2.0.0.16(Debian-2.0.0.16-0etch1)"
Thanks in advance :)
*
*
___
Zope-Dev maillist - Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )