|
|
|
@ -1,12 +1,12 @@
@@ -1,12 +1,12 @@
|
|
|
|
|
from collections import namedtuple |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FlashMessage = namedtuple('FlashMessage', 'message description') |
|
|
|
|
FlashMessage = namedtuple('FlashMessage', 'message description dismissable') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def flash(request, channel, message, description=''): |
|
|
|
|
def flash(request, channel, message, description='', dismissable=True): |
|
|
|
|
''' small wrapper around request.session.flash ''' |
|
|
|
|
msg = FlashMessage(message=message, description=description) |
|
|
|
|
msg = FlashMessage(message, description, dismissable) |
|
|
|
|
request.session.flash(msg, channel, allow_duplicate=False) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|