Michele Cella wrote:
> I've attached my work (based on Ian Bicking conservative metaclass [1]
> and a snippets of code from formencode) to this ticket:
>
> http://trac.turbogears.org/turbogears/ticket/454
>
> All comments are *very* welcome.
>

>From r581 you can use again declarative forms, that's an example (from
the unit test):

        def test_creation():
            class TestFormFields(widgets.WidgetsDeclaration):
                foo = widgets.TextField()
                bar = widgets.CheckBox()
            t = widgets.TableForm(TestFormFields() +
[widgets.TextField('a')])
            assert len(t.widgets) == 3, '%s' % [x.name for x in t.widgets]
            assert t.widgets[0].name == 'foo'
            assert t.widgets[1].name == 'bar'
            assert t.widgets[2].name == 'a'

Ciao
Michele

Reply via email to