예제 #1
0
파일: notification.py 프로젝트: zhill/quay
def delete_all_notifications_by_kind(kind_name):
    kind_ref = NotificationKind.get(name=kind_name)
    (Notification.delete().where(Notification.kind == kind_ref).execute())
예제 #2
0
파일: notification.py 프로젝트: zhill/quay
def delete_notifications_by_kind(target, kind_name):
    kind_ref = NotificationKind.get(name=kind_name)
    Notification.delete().where(Notification.target == target,
                                Notification.kind == kind_ref).execute()
예제 #3
0
파일: notification.py 프로젝트: zhill/quay
def delete_all_notifications_by_path_prefix(prefix):
    (Notification.delete().where(Notification.lookup_path**(prefix +
                                                            "%")).execute())