예제 #1
0
 def updateNotification(self):
     notifications = Notification.getActiveByEmployeeId(10)
     print notifications
     for notification in notifications:
         if notification != None:
             notification.message = "Sucka"
             notification.update()
 def get(self):
     # return all the notifications for the current logged in user
     # return json
     notifications = Notification.getActiveByEmployeeId(current_user.employee_id)
     json_not = list()
     for notif in notifications:
         json_not.append(notif.toDict())
     return json.dumps(json_not)
예제 #3
0
 def getNotification(self):
     notifications = Notification.getActiveByEmployeeId(10)
     print notifications
     for notification in notifications:
         if notification != None:
             print notification.employee_id
             print notification.message
             print notification.active
예제 #4
0
 def deleteNotification(self):
     notifications = Notification.getActiveByEmployeeId(10)
     print notifications
     for notification in notifications:
         if notification != None:
             Notification.delete(notification)