I am trying out my first widget using snv rev 250.
I create a widget like this:
dateField = LocalizedCalendarDatePicker()
dateField.name = 'dateField'
I put it in a dictionary like this:
kw['dateField'] = dateField.render()
and then I try to use it in a kid template like this:
<tr>
<td>Date:</td>
<td><div py:replace="XML(dateField)"></div></td>
</tr>
and I get the traceback pasted below.
If I remove the XML() I can see the widget's html and it looks reasonable.
Thanks for any assistance. I can't wait to see that popup calender in
my form! :-)
-Steve
Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py",
line 271, in run
main()
File
"/usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py",
line 502, in main
body = page_handler(*args, **cherrypy.request.paramMap)
File "/home/steve/turbogears/turbogears/controllers.py", line 206, in newfunc
return controllers._process_output(tg_format, output, html)
File "/home/steve/turbogears/turbogears/controllers.py", line 58, in
_process_output
output = view.render(output, tg_format, template=template)
File "/home/steve/turbogears/turbogears/view.py", line 110, in render
return t.serialize(encoding=defaultencoding, output=format,
fragment=fragment)
File "/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/__init__.py",
line 231, in serialize
return serializer.serialize(self, encoding, fragment)
File
"/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/serialization.py",
line 47, in serialize
text = list(self.generate(stream, encoding, fragment))
File
"/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/serialization.py",
line 301, in generate
for ev, item in self.apply_filters(stream):
File
"/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/serialization.py",
line 73, in balancing_filter
for ev, item in stream:
File "/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/pull.py", line
179, in _coalesce
for ev, item in stream:
File "/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/filter.py",
line 21, in transform_filter
for ev, item in apply_matches(stream, template, templates, apply_func):
File "/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/filter.py",
line 31, in apply_matches
item = stream.expand()
File "/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/pull.py", line
87, in expand
for ev, item in self._iter:
File "/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/pull.py", line
152, in _track
for p in stream:
File "/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/pull.py", line
179, in _coalesce
for ev, item in stream:
File "/home/steve/tgta9/tgta9/templates/timesheetForm.py", line 128, in _pull
File "/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/pull.py", line
111, in strip
for (ev, item) in self._iter:
File "/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/pull.py", line
152, in _track
for p in stream:
File "/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/pull.py", line
179, in _coalesce
for ev, item in stream:
File "/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/pull.py", line
321, in __iter__
for (ev, stuff) in self._expat_stream():
File "/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/pull.py", line
293, in _expat_stream
feed(data)
File "/usr/lib/python2.4/site-packages/kid-0.7.1-py2.4.egg/kid/pull.py", line
361, in feed
raise e
ExpatError: mismatched tag: line 11, column 11