From a5506610ad7b497dadbab1ccde471b3d13c614ff Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Fri, 20 Mar 2015 15:17:49 +0100 Subject: [PATCH] Put the needed import in one example --- docs/api-guide/versioning.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/api-guide/versioning.md b/docs/api-guide/versioning.md index a227a4a3d..846698fc1 100644 --- a/docs/api-guide/versioning.md +++ b/docs/api-guide/versioning.md @@ -31,6 +31,8 @@ How you vary the API behavior is up to you, but one example you might typically The `reverse` function included by REST framework ties in with the versioning scheme. You need to make sure to include the current `request` as a keyword argument, like so. + from rest_framework.reverse import reverse + reverse('bookings-list', request=request) The above function will apply any URL transformations appropriate to the request version. For example: