diff options
author | Stephen Finucane <stephen@that.guru> | 2017-04-27 00:58:03 +0100 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2017-04-28 23:52:04 +0100 |
commit | 5094cfdbf0b11af44f979b16e43e8cce36378322 (patch) | |
tree | 9b95ee6b274c991ea21371fd4c842b1e22ffc4f7 /docs/api | |
parent | f75be7ed94ab98769b1c1fbcdef80a1c643724d5 (diff) | |
download | patchwork-5094cfdbf0b11af44f979b16e43e8cce36378322.tar patchwork-5094cfdbf0b11af44f979b16e43e8cce36378322.tar.gz |
REST: Fix versioning
One of the few remaining warts in the API is versioning. There is some
basic versioning there, but it doesn't work properly as-is. Fix this by
correcting the index endpoint ('/') to use Django REST Framework's
'reverse' function [1], which handles versioning for us [2] and
switching from 'NamespaceVersioning' to 'URLPathVersioning', the latter
of which does the same thing but in a different way.
[1] http://www.django-rest-framework.org/api-guide/reverse/#reverse
[2] http://www.django-rest-framework.org/api-guide/versioning/#reversing-urls-for-versioned-apis
[3] http://www.django-rest-framework.org/api-guide/versioning/#urlpathversioning
Signed-off-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'docs/api')
0 files changed, 0 insertions, 0 deletions