@csrf_exempt
@user_passes_test(is_in_prereg_group)
def reject_draft(request, draft_pk):
    draft = get_draft_or_error(draft_pk)

    user = request.user.osf_user
    draft.reject(user)
    update_admin_log(
        request.user.id, draft._id, 'Draft Registration',
        'rejected', action_flag=REJECT_PREREG
    )
    return redirect(reverse('pre_reg:prereg') + "?page={0}".format(request.POST.get('page', 1)), permanent=True)
Rejects current draft
dataset/ETHPy150Open CenterForOpenScience/osf.io/admin/pre_reg/views.py/reject_draft