I tried doing this:
def index():
doc = Document()
return doc
class Document(FORM):
def __init__(self):
super(Document, self).__init__(self)
self.append('A message')
But when I run it I get this huge ticket with
an error about recursion. I wouldn't have thought
there would be any difference then just making
the FORM() and appending text to it, which works.
Thanks!
Tobiah
Traceback (most recent call last):
File "/home/toby/web2py/gluon/main.py", line 498, in wsgibase
serve_controller(request, response, session)
File "/home/toby/web2py/gluon/main.py", line 202, in serve_controller
page = run_controller_in(request.controller, request.function, environment)
File "/home/toby/web2py/gluon/compileapp.py", line 581, in run_controller_in
vars = vars.xml()
File "/home/toby/web2py/gluon/html.py", line 1896, in xml
return DIV.xml(newform)
File "/home/toby/web2py/gluon/html.py", line 848, in xml
(fa, co) = self._xml()
File "/home/toby/web2py/gluon/html.py", line 839, in _xml
self.components])
File "/home/toby/web2py/gluon/html.py", line 114, in xmlescape
return data.xml()
File "/home/toby/web2py/gluon/html.py", line 1896, in xml
return DIV.xml(newform)
File "/home/toby/web2py/gluon/html.py", line 848, in xml
(fa, co) = self._xml()
File "/home/toby/web2py/gluon/html.py", line 839, in _xml
self.components])
File "/home/toby/web2py/gluon/html.py", line 114, in xmlescape
return data.xml()
File "/home/toby/web2py/gluon/html.py", line 1896, in xml
return DIV.xml(newform)
.....
File "/home/toby/web2py/gluon/html.py", line 1892, in xml
newform = FORM(*self.components, **self.attributes)
File "/home/toby/web2py/gluon/html.py", line 1797, in __init__
DIV.__init__(self, *components, **attributes)
RuntimeError: maximum recursion depth exceeded in __instancecheck__
--