def auto_add(request): ''' add lecture from notification ''' noti_list = Notification.objects.all() update_lecture_from_notification(noti_list) return HttpResponseRedirect(reverse('lecture:manage'))
def update_notification(days): new_notif = search_notifications(days) # dispatch new notification Notification.save_new_notification(new_notif) update_lecture_from_notification(new_notif) return len(new_notif)