Fix DRF deprecation warnings (#23082)

Fix all deprecation warnings generated by Django REST Framework during the unit tests:

* ``The `base_name` argument is pending deprecation in favor of `basename`.`` (86 occurrences)
* `` `detail_route` is deprecated and will be removed in 3.10 in favor of `action`, which accepts a `detail` bool. Use `@action(detail=True)` instead.`` (18 occurrences)
This commit is contained in:
Jeremy Bowman
2020-02-12 12:51:40 -05:00
committed by GitHub
parent 06d0d9f3e1
commit e1d1c29c00
8 changed files with 14 additions and 13 deletions

View File

@@ -6,7 +6,7 @@ from rest_framework.routers import DefaultRouter
from .views import EntitlementEnrollmentViewSet, EntitlementViewSet
router = DefaultRouter()
router.register(r'entitlements', EntitlementViewSet, base_name='entitlements')
router.register(r'entitlements', EntitlementViewSet, basename='entitlements')
ENROLLMENTS_VIEW = EntitlementEnrollmentViewSet.as_view({
'post': 'create',