You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
____________________ ERROR collecting example/urls_test.py _____________________
ImportError while importing test module '/home/travis/build/django-json-api/django-rest-framework-json-api/example/urls_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
example/urls_test.py:4: in <module>
from .api.resources.identity import GenericIdentity, Identity
example/api/resources/identity.py:4: in <module>
from rest_framework.decorators import detail_route, list_route
E ImportError: cannot import name 'detail_route' from 'rest_framework.decorators' (/home/travis/build/django-json-api/django-rest-framework-json-api/.tox/py37-df20-django22-drfmaster/lib/python3.7/site-packages/rest_framework/decorators.py)
The text was updated successfully, but these errors were encountered:
Looks like a pretty easy fix. Set detail=True for detail, False for list:
def action(methods=None, detail=None, url_path=None, url_name=None, **kwargs):
"""
Mark a ViewSet method as a routable action.
Set the `detail` boolean to determine if this action should apply to
instance/detail requests or collection/list requests.
"""
The drfmaster builds are currently failing due to a deprecation described in encode/django-rest-framework#6687:
Here's a snippet showing the error:
The text was updated successfully, but these errors were encountered: