Show More
@@ -683,11 +683,20 b' class Flash(_Flash):' | |||
|
683 | 683 | messages = flash.pop_messages() |
|
684 | 684 | if messages: |
|
685 | 685 | for message in messages: |
|
686 | subdata = {} | |
|
687 | if hasattr(message.message, 'rsplit'): | |
|
688 | flash_data = message.message.rsplit('|DELIM|', 1) | |
|
689 | org_message = flash_data[0] | |
|
690 | if len(flash_data) > 1: | |
|
691 | subdata = json.loads(flash_data[1]) | |
|
692 | else: | |
|
693 | org_message = message.message | |
|
686 | 694 | payloads.append({ |
|
687 | 695 | 'message': { |
|
688 |
'message': u'{}'.format( |
|
|
696 | 'message': u'{}'.format(org_message), | |
|
689 | 697 |
'level': |
|
690 |
'force': |
|
|
698 | 'force': True, | |
|
699 | 'subdata': subdata | |
|
691 | 700 | } |
|
692 | 701 | }) |
|
693 | 702 | return json.dumps(payloads) |
General Comments 0
You need to be logged in to leave comments.
Login now