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)
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
def deleteNotification(self): notifications = Notification.getActiveByEmployeeId(10) print notifications for notification in notifications: if notification != None: Notification.delete(notification)