File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class DefaultRouter(BaseRouter):
29
29
def get_urlpatterns (self ):
30
30
ret = []
31
31
for prefix , viewset , base_name in self .registry :
32
- # Bind standard routes
32
+ # Bind standard CRUD routes
33
33
for suffix , action_mapping , name_format in self .route_list :
34
34
35
35
# Only actions which actually exist on the viewset will be bound
@@ -44,10 +44,12 @@ def get_urlpatterns(self):
44
44
name = name_format % base_name
45
45
ret .append (url (regex , view , name = name ))
46
46
47
- # Bind any extra @action or @link routes
47
+ # Bind any extra ` @action` or ` @link` routes
48
48
for attr in dir (viewset ):
49
49
func = getattr (viewset , attr )
50
50
http_method = getattr (func , 'bind_to_method' , None )
51
+
52
+ # Skip if this is not an @action or @link method
51
53
if not http_method :
52
54
continue
53
55
You can’t perform that action at this time.
0 commit comments