Package disclosure: The author is the creator, owner, and maintainer of django-api-versioning .
URL path versioning makes the API version visible in the request URL:
GET / api / v1 / users / GET / api / v2 / users /
Enter fullscreen mode
Exit fullscreen mode
The version segment gives clients an explicit contract boundary. In Django, however, the URL design and the choice of view implementation are separate decisions. You can write explicit URL patterns, reuse views across patterns, branch inside a DRF view using request.version , or use a registration layer that generates versioned routes.
This article compares those approaches and explains where declarative endpoint registration reduces maintenance—and where ordinary Django routing is already sufficient.
1. Explicit URL patterns
The most direct approach is to map each versioned URL to a view:
# urls.py from django . urls import path
from . views import UserListV1 , UserListV2
urlpatterns = [ path ( "api/v1/users/" , UserListV1 .…