Пример #1
0
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
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
def delete_all_notifications_by_path_prefix(prefix):
    (Notification.delete().where(Notification.lookup_path**(prefix +
                                                            "%")).execute())