@csrf_exempt
@login_required
@require_POST
def draft_revision(request):
 draft_form = DraftRevisionForm(request.POST)
 if draft_form.is_valid():
  draft_form.save(request=request)
  return HttpResponse(status=201)
 return HttpResponseBadRequest()

@ csrf_exempt @ login_required @ require_POST def draft_revision ( request ) : draft_form = DraftRevisionForm ( request . POST ) if draft_form . is_valid ( ) : draft_form . save ( request = request ) return HttpResponse ( status = 201 ) return HttpResponseBadRequest ( )
create a draft revision .