File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 55
66
77class ApiDocumentation (object ):
8- excluded_apps = ["admin" , "rest_framework_docs" ]
9- excluded_endpoints = ["serve" ]
108
119 def __init__ (self ):
1210 self .endpoints = []
@@ -15,9 +13,9 @@ def __init__(self):
1513
1614 def get_all_view_names (self , urlpatterns , parent_pattern = None ):
1715 for pattern in urlpatterns :
18- if isinstance (pattern , RegexURLResolver ) and ( pattern . app_name not in self . excluded_apps ) :
16+ if isinstance (pattern , RegexURLResolver ):
1917 self .get_all_view_names (urlpatterns = pattern .url_patterns , parent_pattern = pattern )
20- elif isinstance (pattern , RegexURLPattern ) and ( pattern . callback . __name__ not in self . excluded_endpoints ) and self ._is_drf_view (pattern ):
18+ elif isinstance (pattern , RegexURLPattern ) and self ._is_drf_view (pattern ):
2119 api_endpoint = ApiEndpoint (pattern , parent_pattern )
2220 self .endpoints .append (api_endpoint )
2321
You can’t perform that action at this time.
0 commit comments