diff --git a/rest_framework/routers.py b/rest_framework/routers.py index 4ee3686ea..4f026046e 100644 --- a/rest_framework/routers.py +++ b/rest_framework/routers.py @@ -189,9 +189,6 @@ class SimpleRouter(BaseRouter): Given a viewset, return the portion of URL regex that is used to match against a single instance. """ - if lookup_prefix: - lookup_prefix += '_' - base_regex = '(?P<{lookup_prefix}{lookup_field}>[^/]+)' lookup_field = getattr(viewset, 'lookup_field', 'pk') return base_regex.format(lookup_field=lookup_field, lookup_prefix=lookup_prefix)