Skip to content

Commit

Permalink
Merge pull request #2733 from pquentin/patch-reverse
Browse files Browse the repository at this point in the history
Put the needed import in one example
  • Loading branch information
tomchristie committed Mar 20, 2015
2 parents e34e053 + a550661 commit 22569e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/api-guide/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 22569e8

Please sign in to comment.