def enter(self, request, *args, **kwargs): method = request.method if method == 'GET': response = self.get(request, *args, **kwargs) elif method == 'POST': response = self.post(request, *args, **kwargs) elif method == 'PUT': response = self.post(request, *args, **kwargs) elif method == 'DELETE': response = self.delete(request, *args, **kwargs) elif method == 'HEAD': response = self.head(request, *args, **kwargs) elif method == 'OPTIONS': response = self.options(request, *args, **kwargs) else: response = method_not_allow() return response
def options(self, request, *args, **kwargs): return method_not_allow()
def head(self, request, *args, **kwargs): return method_not_allow()
def delete(self, request, *args, **kwargs): return method_not_allow()