@csrf_exempt
def rest(request, *pargs):
    if request.method == 'GET':
        rest_function = get
    elif request.method == 'POST':
        rest_function = post
    elif request.method == 'PUT':
        rest_function = put
    elif request.method == 'DELETE':
        rest_function = delete
    else:
        return JsonResponse({"error": "HTTP METHOD UNKNOWN"})

    try:
        return rest_function(request, *pargs)
    except TypeError as e:
            print e
            return HttpResponseBadRequest("unknown method")
Retrieve the model instance matching the given expression.
dataset/ETHPy150Open emccode/heliosburn/heliosburn/django/hbproject/api/views/user.py/rest--crossover with--dataset/ETHPy150Open coleifer/walrus/walrus/models.py/Model.get