None
@view_config(renderer="templates/form.pt", name="dateparts_readonly")
@demonstrate("Date Parts Widget (read-only)")
def dateparts_readonly(self):
import datetime
class Schema(colander.Schema):
date = colander.SchemaNode(
colander.Date(),
widget=deform.widget.DatePartsWidget(readonly=True),
)
schema = Schema()
form = deform.Form(schema, buttons=("submit",))
return self.render_form(
form, appstruct={"date": datetime.date(2010, 5, 5)}
)