add status class in
This commit is contained in:
29
status.py
Normal file
29
status.py
Normal file
@@ -0,0 +1,29 @@
|
||||
### shared variables to show state of save/delete when we redirect to 'show all' view
|
||||
class Status:
|
||||
alert="success"
|
||||
message=""
|
||||
|
||||
def GetAlert(self):
|
||||
return self.alert
|
||||
|
||||
def SetAlert(self, al):
|
||||
self.alert=al
|
||||
return
|
||||
|
||||
def GetMessage(self):
|
||||
return self.message
|
||||
|
||||
def SetMessage(self, msg):
|
||||
self.message=msg
|
||||
return
|
||||
|
||||
def AppendMessage(self, msg):
|
||||
self.message=self.message+msg
|
||||
return
|
||||
|
||||
def ClearMessage(self):
|
||||
self.alert="success"
|
||||
self.message=""
|
||||
return ""
|
||||
|
||||
st=Status()
|
||||
Reference in New Issue
Block a user