def __call__(self, context): terms = [SimpleTerm(u'friendly', title=_(u'Friendly messages')), SimpleTerm(u'verbose', title=_(u'Verbose messages')), SimpleTerm(u'quiet', title=_(u'No messages at all')), ] return SimpleVocabulary(terms)
def __call__(self, *args, **kwargs): notify(Purge(self.context)) messages = IStatusMessage(self.request) messages.add(_(u"Item purged"), type=u"info") self.request.response.redirect(self.context.absolute_url() + '/view')