<s> from django . contrib . auth . decorators import login_required <EOL> from django . shortcuts import render <EOL> from orchestra . models import Worker <EOL> from orchestra . communication . staffing import handle_staffing_response <EOL> @ login_required <EOL> def accept_staffing_request ( request , staffing_request_id ) : <EOL> worker = Worker . objects . get ( user = request . user ) <EOL> response = handle_staffing_response ( <EOL> worker , staffing_request_id , is_available = True ) <EOL> return render ( request , '<STR_LIT>' , <EOL> { <EOL> '<STR_LIT>' : response , <EOL> } ) <EOL> @ login_required <EOL> def reject_staffing_request ( request , staffing_request_id ) : <EOL> worker = Worker . objects . get ( user = request . user ) <EOL> handle_staffing_response ( worker , staffing_request_id , is_available = False ) <EOL> return render ( request , '<STR_LIT>' , <EOL> { } ) </s>
