Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(41)  |  Call(29)  |  Derive(0)  |  Import(12)

src/p/r/Products.Archetypes-1.10.1/Products/Archetypes/skins/archetypes/rejectAnonymous.py   Products.Archetypes(Download)
 
from Products.Archetypes import PloneMessageFactory as _
from Products.Archetypes.utils import addStatusMessage
 
if context.portal_membership.isAnonymousUser():
 
    url = '%s/login_form' % context.portal_url()
    addStatusMessage(REQUEST, _(u'You must sign in first.'), type='info')

src/p/r/Products.Archetypes-HEAD/Products/Archetypes/skins/archetypes/rejectAnonymous.py   Products.Archetypes(Download)
 
from Products.Archetypes import PloneMessageFactory as _
from Products.Archetypes.utils import addStatusMessage
 
if context.portal_membership.isAnonymousUser():
 
    url = '%s/login_form' % context.portal_url()
    addStatusMessage(REQUEST, _(u'You must sign in first.'), type='info')

src/c/o/collective.loremipsum-0.8/collective/loremipsum/browser/populate.py   collective.loremipsum(Download)
from plone.z3cform.layout import FormWrapper
from plone.z3cform.fieldsets.extensible import ExtensibleForm
from Products.Archetypes.utils import addStatusMessage
from Products.Archetypes.utils import shasattr
 
        total = create_subobjects(context, context, data, 0)
        addStatusMessage(
                self.request, 
                'Successfully created %d dummy objects.' % total, 
                type='info')

src/s/l/slc.calendarfetcher-0.1b5/src/slc/calendarfetcher/utils.py   slc.calendarfetcher(Download)
from urllib2 import HTTPError
import zope.component
from Products.Archetypes.utils import addStatusMessage
 
def fetch_calendars(context, request, urls):
        except HTTPError, e:
            msg = "Received a '404 Not Found' error for %s" % url
            addStatusMessage(request, msg, type='error')
        else:
            msg = '%s from %s' % (message, url)
            addStatusMessage(request, msg, type='info')

src/s/l/slc.calendarfetcher-0.1b5/src/slc/calendarfetcher/browser/calendarfetcher.py   slc.calendarfetcher(Download)
from plone.z3cform.layout import FormWrapper
 
from Products.Archetypes.utils import addStatusMessage
from Products.CMFCore.utils import getToolByName
from Products.Five import BrowserView
        annotations = IAnnotations(self.context)
        annotations['slc.calendarfetcher-urls'] = urls
        addStatusMessage(self.request, 'URLs Saved', type='info')
        self.request.response.redirect(self.context.REQUEST.get('URL'))
 
        annotations = IAnnotations(self.context)
        annotations['slc.calendarfetcher-urls'] = urls
        addStatusMessage(self.request, 'URLs Saved', type='info')
        self.request.response.redirect(self.context.REQUEST.get('URL'))
 

src/p/r/Products.CMFNotification-2.3b1/Products/CMFNotification/browser/configlet.py   Products.CMFNotification(Download)
from zope.interface import implements
 
from Products.Archetypes.utils import addStatusMessage
from Products.Five import BrowserView
from Products.CMFCore.utils import getToolByName
                                              userid,
                                              path)
        addStatusMessage(self.request,
                         "User(s) unsubscribed successfully",
                         type='info')

src/s/l/slc.facetedcalendar-0.3/slc/facetedcalendar/browser/form.py   slc.facetedcalendar(Download)
from zope.annotation.interfaces import IAnnotations
from z3c.form import button
from z3c.form import field
from z3c.form import form
from Products.Archetypes.utils import addStatusMessage
        annotations = IAnnotations(self.context)
        annotations['slc.facetedcalendar.facets'] = data['facets']
        addStatusMessage(self.request, _('Filters Saved'), type='info')
        self.request.response.redirect('/'.join(self.context.getPhysicalPath()))
 

src/p/r/Products.Archetypes-1.10.1/Products/Archetypes/skins/archetypes/content_edit_impl.py   Products.Archetypes(Download)
 
from Products.Archetypes import PloneMessageFactory as _
from Products.Archetypes.utils import addStatusMessage
 
REQUEST = context.REQUEST
        if index < len(s_names):
            next_schemata = s_names[index]
            addStatusMessage(REQUEST, portal_status_message)
            return state.set(status='next_schemata',
                             context=new_context,
                             fieldset=next_schemata)
 
    if next_schemata != None:
        addStatusMessage(REQUEST, portal_status_message)
        'reference_focus': reference_source_field,
        }
    addStatusMessage(REQUEST, portal_status_message)
    return state.set(**kwargs)
 
        if f_name in errors:
            REQUEST.set('fieldset', s_name)
            addStatusMessage(REQUEST, portal_status_message)
            return state.set(
                status='failure',

src/p/r/Products.Archetypes-HEAD/Products/Archetypes/skins/archetypes/content_edit_impl.py   Products.Archetypes(Download)
 
from Products.Archetypes import PloneMessageFactory as _
from Products.Archetypes.utils import addStatusMessage
 
REQUEST = context.REQUEST
        if index < len(s_names):
            next_schemata = s_names[index]
            addStatusMessage(REQUEST, portal_status_message)
            return state.set(status='next_schemata',
                             context=new_context,
                             fieldset=next_schemata)
 
    if next_schemata != None:
        addStatusMessage(REQUEST, portal_status_message)
        'reference_focus': reference_source_field,
        }
    addStatusMessage(REQUEST, portal_status_message)
    return state.set(**kwargs)
 
        if f_name in errors:
            REQUEST.set('fieldset', s_name)
            addStatusMessage(REQUEST, portal_status_message)
            return state.set(
                status='failure',

src/p/r/Products.CMFBibliographyAT-1.1.4.1/Products/CMFBibliographyAT/browser/import.py   Products.CMFBibliographyAT(Download)
from Products.CMFCore.utils import getToolByName
from Products.Archetypes import PloneMessageFactory as _
from Products.Archetypes.utils import addStatusMessage
from bibliograph.core.utils import _encode
from Products.CMFBibliographyAT.tool.bibliography import ImportParseError
                self.errors['file'] = _(u'You must import a file or enter a'
                                         ' text.')
                addStatusMessage(self.request,
                                 _(u"Please correct the indicated errors."))
                return self.template()
            source = upfile.read()
            if not source or not isinstance(source, basestring):
                msg = "Could not read the file '%s'." % filename
                self.errors['file'] = msg
                addStatusMessage(self.request, _(unicode(msg)))
                                                            filename)
            self.errors['format'] = msg
            addStatusMessage(self.request, _(unicode(msg)))
            return self.template()
        except UnicodeError:
            msg = """The choosen input encoding does not match the real  """ \
                  """encoding of your input data in order to convert it to """\
                  """unicode internally."""
            self.errors['input_encoding'] = msg
            addStatusMessage(self.request, _(unicode(msg)))

  1 | 2  Next