Example #1
0
 def patch(self, request, id=None):
     if id is not None:
         return patch_file(request, self.Model, id)
     else:
         return api.invalid_endpoint()
Example #2
0
 def post(self, request, id=None):
     if id is not None:
         return api.invalid_endpoint()
     else:
         return create_file(request, self.Model)
Example #3
0
 def delete(self, request, id=None):
     if id is not None:
         return delete_file(request, self.Model, id)
     else:
         return api.invalid_endpoint()
Example #4
0
 def _not_implemented(request, *args, **kwargs):
     return api.invalid_endpoint()
Example #5
0
 def put(self, request, pk=None):
     if pk is not None:
         return self._update_method(request, pk)
     else:
         return api.invalid_endpoint()
Example #6
0
 def patch(self, request, pk=None):
     if pk is not None:
         return self._patch_method(request, pk)
     else:
         return api.invalid_endpoint()
Example #7
0
 def delete(self, request, pk=None):
     if pk is not None:
         return self._delete_method(request, pk)
     else:
         return api.invalid_endpoint()
Example #8
0
 def post(self, request, pk=None):
     if pk is not None:
         return api.invalid_endpoint()
     return self._create_method(request)