Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1728 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

[PATCH] TG2 flash message not reset

Reported by: andrew.basson Owned by: andrew.basson
Priority: normal Milestone:
Component: TurboGears Version: trunk
Severity: minor Keywords: tg_flash flash_message
Cc:

Description

Flash message not resetting.

tg.get_flash() not resetting session data once method was called.

Attachments

flash.py-bas.diff Download (507 bytes) - added by andrew.basson 11 years ago.
flash_reset.diff Download (509 bytes) - added by andrew.basson 11 years ago.

Change History

Changed 11 years ago by andrew.basson

comment:1 Changed 11 years ago by andrew.basson

  • Status changed from new to assigned

The diff is not rendering in trac for some or other reason.

Here it is...

Index: tg/flash.py
===================================================================
--- tg/flash.py (revision 4141)
+++ tg/flash.py (working copy)
@@ -20,8 +20,11 @@
 def get_flash():
    """Returns the message previously set by calling flash()"""
    msg = session.get('flash_message', '')
+    session['flash_message']=''
+    session.save()
    return msg

 def get_status():
    status = session.get('flash_status', 'status_ok')
-    return status
\ No newline at end of file
+    return status

Changed 11 years ago by andrew.basson

comment:2 Changed 11 years ago by mramm

  • Status changed from assigned to closed
  • Resolution set to fixed

Applied Andrew's diff, along with a fix to the flash status....

comment:3 Changed 11 years ago by anonymous

  • Milestone 2.0-preview-1 deleted

Milestone 2.0-preview-1 deleted

Note: See TracTickets for help on using tickets.