@@ -177,26 +177,26 @@ def get_routes(self, viewset):
177
177
# Dynamic detail routes (@detail_route decorator)
178
178
for httpmethods , methodname in detail_routes :
179
179
method_kwargs = getattr (viewset , methodname ).kwargs
180
- custom_method_name = method_kwargs .pop ("custom_method_name " , None ) or methodname
180
+ url_path = method_kwargs .pop ("url_path " , None ) or methodname
181
181
initkwargs = route .initkwargs .copy ()
182
182
initkwargs .update (method_kwargs )
183
183
ret .append (Route (
184
- url = replace_methodname (route .url , custom_method_name ),
184
+ url = replace_methodname (route .url , url_path ),
185
185
mapping = dict ((httpmethod , methodname ) for httpmethod in httpmethods ),
186
- name = replace_methodname (route .name , custom_method_name ),
186
+ name = replace_methodname (route .name , url_path ),
187
187
initkwargs = initkwargs ,
188
188
))
189
189
elif isinstance (route , DynamicListRoute ):
190
190
# Dynamic list routes (@list_route decorator)
191
191
for httpmethods , methodname in list_routes :
192
192
method_kwargs = getattr (viewset , methodname ).kwargs
193
- custom_method_name = method_kwargs .pop ("custom_method_name " , None ) or methodname
193
+ url_path = method_kwargs .pop ("url_path " , None ) or methodname
194
194
initkwargs = route .initkwargs .copy ()
195
195
initkwargs .update (method_kwargs )
196
196
ret .append (Route (
197
- url = replace_methodname (route .url , custom_method_name ),
197
+ url = replace_methodname (route .url , url_path ),
198
198
mapping = dict ((httpmethod , methodname ) for httpmethod in httpmethods ),
199
- name = replace_methodname (route .name , custom_method_name ),
199
+ name = replace_methodname (route .name , url_path ),
200
200
initkwargs = initkwargs ,
201
201
))
202
202
else :
0 commit comments