From 965ba91806695b7e21664dd2147319336dd1a6d8 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 5 Apr 2018 12:24:31 +0000 Subject: [PATCH] Docs: Add missing argument 'detail' to Route (#5920) The namedtuple Route requires `detail` to be specified, otherwise it fails with: `TypeError: __new__() missing 1 required positional argument: 'detail'` See https://github.com/encode/django-rest-framework/pull/5705/files#diff-88b0cad65f9e1caad64e0c9bb44615f9R34 --- docs/api-guide/routers.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/api-guide/routers.md b/docs/api-guide/routers.md index e2092b58713..2609185eeee 100644 --- a/docs/api-guide/routers.md +++ b/docs/api-guide/routers.md @@ -241,12 +241,14 @@ The following example will only route to the `list` and `retrieve` actions, and url=r'^{prefix}$', mapping={'get': 'list'}, name='{basename}-list', + detail=False, initkwargs={'suffix': 'List'} ), Route( url=r'^{prefix}/{lookup}$', mapping={'get': 'retrieve'}, name='{basename}-detail', + detail=True, initkwargs={'suffix': 'Detail'} ), DynamicRoute(