From f4f07d7312fa27e4653089498a3fe50f54b26c2e Mon Sep 17 00:00:00 2001 From: Michael K Date: Thu, 5 Apr 2018 14:05:10 +0200 Subject: [PATCH] Docs: Add missing argument 'detail' to Route 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 e2092b5871..2609185eee 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(