On 04/26/2017 06:58 PM, Stephen Finucane wrote:
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 <[email protected]>
Cc: Andy Doan <[email protected]>

Sorry for the slow response, but this is a clear improvement.

Reviewed-by: Andy Doan <[email protected]>
_______________________________________________
Patchwork mailing list
[email protected]
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to