diff --git a/rest_framework/urlpatterns.py b/rest_framework/urlpatterns.py index 2ce4ba52d..f32f15e00 100644 --- a/rest_framework/urlpatterns.py +++ b/rest_framework/urlpatterns.py @@ -27,10 +27,10 @@ def apply_suffix_patterns(urlpatterns, suffix_pattern, suffix_required): view = urlpattern.callback kwargs = urlpattern.default_args name = urlpattern.name - # Add in both the existing and the new urlpattern + # Add in both the new and the existing urlpattern + ret.append(url(regex, view, kwargs, name)) if not suffix_required: ret.append(urlpattern) - ret.append(url(regex, view, kwargs, name)) return ret