Skip to content

Commit 22569e8

Browse files
committed
Merge pull request #2733 from pquentin/patch-reverse
Put the needed import in one example
2 parents e34e053 + a550661 commit 22569e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/api-guide/versioning.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ How you vary the API behavior is up to you, but one example you might typically
3131

3232
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.
3333

34+
from rest_framework.reverse import reverse
35+
3436
reverse('bookings-list', request=request)
3537

3638
The above function will apply any URL transformations appropriate to the request version. For example:

0 commit comments

Comments
 (0)