32 lines
834 B
Python
32 lines
834 B
Python
from shared import PA
|
|
|
|
### shared variables to show state of save/delete when we redirect to 'show all' view
|
|
# used mostly to note we have create a job for the job manager, or when a job finishes
|
|
# including when duplicates are found on import. These status messages are exposed into
|
|
# the html files, and they show once for success/green, and sticky for danger/red
|
|
class Status(PA):
|
|
alert="success"
|
|
message=""
|
|
|
|
def GetAlert(self):
|
|
return self.alert
|
|
|
|
def GetMessage(self):
|
|
return self.message
|
|
|
|
def SetMessage(self, msg, al="success"):
|
|
self.message=msg
|
|
self.alert=al
|
|
return
|
|
|
|
def AppendMessage(self, msg):
|
|
self.message=self.message+msg
|
|
return
|
|
|
|
def ClearStatus(self):
|
|
self.alert="success"
|
|
self.message=""
|
|
return ""
|
|
|
|
st=Status()
|