##// END OF EJS Templates
pyramid: make flash messages not rely strictly on pylons session....
marcink -
r1905:741dca9b default
parent child Browse files
Show More
@@ -660,14 +660,17 b' class _Message(object):'
660
660
661 class Flash(_Flash):
661 class Flash(_Flash):
662
662
663 def pop_messages(self):
663 def pop_messages(self, request=None):
664 """Return all accumulated messages and delete them from the session.
664 """Return all accumulated messages and delete them from the session.
665
665
666 The return value is a list of ``Message`` objects.
666 The return value is a list of ``Message`` objects.
667 """
667 """
668 from pylons import session
668 messages = []
669
669
670 messages = []
670 if request:
671 session = request.session
672 else:
673 from pylons import session
671
674
672 # Pop the 'old' pylons flash messages. They are tuples of the form
675 # Pop the 'old' pylons flash messages. They are tuples of the form
673 # (category, message)
676 # (category, message)
General Comments 0
You need to be logged in to leave comments. Login now