def csrf_failure(request, reason=''):
    '\n    customize the response for csrf_token invalid\n    '
    get_token(request)
    return JResponse(codes.get('csrf_invalid'), status=403)
customize the response for csrf_token invalid
def csrf_failure(request, reason=):
    '\n    \n    '
    get_token(request)
    return JResponse(codes.get('csrf_invalid'), status=403)