Source

tw2.core-docs-pyramid / myapp / myapp / widgets.py

Full commit
import tw2.core
import tw2.forms

class MovieForm(tw2.forms.FormPage):
    resources = [tw2.core.CSSLink(link='static/myapp.css')]
    title = 'Movie'
    class child(tw2.forms.TableForm):
        title = tw2.forms.TextField(validator=tw2.core.Required)
        director = tw2.forms.TextField()
        genres = tw2.forms.CheckBoxList(
            options=['Action', 'Comedy', 'Romance', 'Sci-fi'])
        class cast(tw2.forms.GridLayout):
            extra_reps = 5
            character = tw2.forms.TextField()
            actor = tw2.forms.TextField()