def http_method_not_allowed(self, request, *args, **kwargs):
if settings.DEBUG and self._allowed_methods():
raise Exception("Only" + str(self._allowed_methods()))
return http.HttpResponseNotAllowed(self._allowed_methods())
评论列表
文章目录