Skip to content

Commit 8391109

Browse files
naquirozatodorov
authored andcommitted
Add all default methods of view class to is_model_view_subclass_method_shouldnt_be_function
1 parent 04cf23d commit 8391109

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pylint_django/augmentations/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,8 @@ def is_attribute(node):
630630

631631

632632
def is_model_view_subclass_method_shouldnt_be_function(node):
633-
"""Checks that node is get or post method of the View class."""
634-
if node.name not in ('get', 'post'):
633+
"""Checks that node is a default http method (i.e get, post, put, and more) of the View class."""
634+
if node.name not in View.http_method_names:
635635
return False
636636

637637
parent = node.parent

0 commit comments

Comments
 (0)