Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Add status message

Predefined message types

* info

* success

* warning
(more...)

        def add_message(request, msg, type='info'):
    """ Add status message

    Predefined message types

    * info

    * success

    * warning

    * error

    """
    if ':' not in type:
        type = 'message:%s'%type

    request.session.flash(render(request, type, msg), 'status')
        


src/p/f/pform-0.6.2/pform/form.py   pform(Download)
from pyramid.httpexceptions import HTTPException, HTTPForbidden
from pyramid.config.views import DefaultViewMapper
from player import layout, render, tmpl_filter, add_message
 
from pform.field import Field
    def add_error_message(self, msg):
        """ add form error message """
        add_message(self.request, msg, 'form:error')
 
    def __call__(self):