I'm trying to run longclaw, but i get an error
$ python manage.py makemigrations catalog home
Traceback (most recent call last):
[...]
File "/lib/python3.7/site-packages/longclaw/basket/api.py", line 1, in <module>
from rest_framework.decorators import detail_route, list_route
ImportError: cannot import name 'detail_route' from 'rest_framework.decorators'
Its because detail_route
has been deprecated from DRF 3.8. You can check their change-log as well. Alternatively, you can use actions
decorator. For example:
from rest_framework.decorators import action
@action(detail=True, methods=['post'])
def set_password(self, request, pk=None):
....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With