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 5
5
6
6
7
7
class ApiDocumentation (object ):
8
- excluded_apps = ["admin" , "rest_framework_docs" ]
9
- excluded_endpoints = ["serve" ]
10
8
11
9
def __init__ (self ):
12
10
self .endpoints = []
@@ -15,9 +13,9 @@ def __init__(self):
15
13
16
14
def get_all_view_names (self , urlpatterns , parent_pattern = None ):
17
15
for pattern in urlpatterns :
18
- if isinstance (pattern , RegexURLResolver ) and ( pattern . app_name not in self . excluded_apps ) :
16
+ if isinstance (pattern , RegexURLResolver ):
19
17
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 ):
21
19
api_endpoint = ApiEndpoint (pattern , parent_pattern )
22
20
self .endpoints .append (api_endpoint )
23
21
You can’t perform that action at this time.
0 commit comments