def __call__(self, context): """ 5 to 50 in increments of 5 """ value = 5 terms = [] while value <= 50: terms.append(SimpleTerm(value=value, title=_(str(value)))) value += 5 return SimpleVocabulary(terms)
def __call__(self, context): return SimpleVocabulary([SimpleTerm(value='tv-vcr', title=_(u'TV/VCR')), SimpleTerm(value='tv-dvd', title=_(u'TV/DVD')), SimpleTerm(value='easel', title=_(u'Easel')), SimpleTerm(value='digital-projector', title=_(u'Digital Projector')), SimpleTerm(value='overhead-projector', title=_(u'Overhead Projector')), SimpleTerm(value='screen', title=_(u'Screen'))])
def validate(self, value): super(EmailValidator, self).validate(value) if not re.match(self.regex, value) or value.endswith('.'): raise Invalid(_("Not a valid e-mail address"))
def __call__(self, context): return SimpleVocabulary([SimpleTerm(value=None, title=_(u'-- Select --')), SimpleTerm(value=10, title=_(u'10')), SimpleTerm(value=15, title=_(u'15')), SimpleTerm(value=20, title=_(u'20')), SimpleTerm(value=25, title=_(u'25'))])
def __call__(self, context): return SimpleVocabulary([SimpleTerm(value=None, title=_(u'-- Select --')), SimpleTerm(value=75, title=_(u'75')), SimpleTerm(value=150, title=_(u'150')), SimpleTerm(value=225, title=_(u'225')), SimpleTerm(value=300, title=_(u'300'))])
def __call__(self, context): return SimpleVocabulary([SimpleTerm(value=None, title=_(u'-- Select --')), SimpleTerm(value=u'yes', title=_(u'Yes')), SimpleTerm(value=u'no', title=_(u'No'))])