[Zope3-dev] Re: a plan for widgets?
Sidnei da Silva
sidnei at enfoldsystems.com
Thu Mar 16 22:31:59 EST 2006
On Thu, Mar 16, 2006 at 08:06:11PM -0700, Jeff Shell wrote:
| By the way, isn't it pretty easy to provide straight up values anyways
| for those quick drop-down situations?
|
| trip_type = zope.schema.Choice(
| title=_(u"Trip Type"),
| description=_(u"Trip Type"),
| default=u"Business",
| required=True,
| values=(u"Business", u"Personal"),
| )
|
| replacementOptions = SimpleVocabulary((
| SimpleTerm(value='none', title='No - keep all current articles'),
| SimpleTerm(value='matching', title='Only replace matching IDs'),
| SimpleTerm(value='all', title='Yes - replace all existing articles'),
| ))
| class ImportSchema(Interface):
| importfile = zope.schema.Bytes(
| title=u"Import Zip File",
| description=u"Zipe file of items to import.",
| required=True,
| )
|
| replace = zope.schema.Choice(
| title=u"Replace existing articles?",
| vocabulary=replacementOptions,
| default='none',
| )
Yum Yum. That reminds me of Archetypes-Hum.
--
Sidnei da Silva
Enfold Systems, Inc.
http://enfoldsystems.com
More information about the Zope3-dev
mailing list