@login_required
def read_and_redirect(request, notification_id):
    notification_page = reverse('notifications:all')
    next_page = request.GET.get('next', notification_page)

    if is_safe_url(next_page):
        target = next_page
    else:
        target = notification_page
    try:
        user_nf = request.user.notifications.get(pk=notification_id)
        if not user_nf.read:
            user_nf.mark_as_read()
    except Notification.DoesNotExist:
        pass

    return HttpResponseRedirect(target)
Marks the supplied notification as read and then redirects
dataset/ETHPy150Open v1k45/django-notify-x/notify/views.py/read_and_redirect