The docs say you can set trailing_slash=False but how can you allow both endpoints to work, with or without a trailing slash?
trailing_slash=False
If you're using DRF's routers and viewsets, you can include /? in your prefix.
/?
from rest_framework import routers from .views import ClientViewSet router = routers.SimpleRouter(trailing_slash=False) router.register(r"clients/?", ClientViewSet)