Excerpts from BruceC's message of Tue Jan 24 20:13:16 -0500 2012:
I think this is what you want::
In [1]: import tw2.forms as twf
In [2]: class MyForm(twf.Form):
...: title = 'My Form!'
...: class child(twf.TableForm):
...: title = twf.TextField
...: director = twf.TextField
...: genres = twf.CheckBoxList(options=['numbah 1', 'numbah 2'])
In [3]: MyForm.child.child.children.director.display()
Out[3]: u'<input id="director"/>'
Is that sufficient for your needs?
I'm also not sure that its clear how to do this in the documentation; I'm filing a ticket to shore this up.
All the best,
Ralph
Cool. I'll go chime in on it.
Awesome! Glad to know someone is using it. :)
> So, I haz a question - have the team had any thoughts at all about a Python
> 3 port? I'm assembling a set of Python 3 versions of my favourite add-ons
> and the section labelled "tw2" is noticeably blank. I appreciate that tw2
> is still under development and that time/effort is at an enormous premium
> when it's available at all but I was just idly wondering, 'cos I'll
> obviously have a go myself at scoping the issue at least and if there's
> work that's already been done towards this end, I'd much prefer to start
> from there.
There's been no concrete effort to port to Python 3 yet, but the idea is exciting to me. Can you file a ticket for it at http://bitbucket.org/paj/tw2core ? We've been noticeably inactive in general the past few months but I've a mind to sprint on tw2 bugs and get out of this 'beta' label before PyCon US. Seems like post-beta is a good time to start up with python 3.
There's been no concrete effort to port to Python 3 yet, but the idea is exciting to me. Can you file a ticket for it at http://bitbucket.org/paj/tw2core ?
Graham, thanks so much. That reference work is incredibly valuable.
Yours,
Ralph