3👍
✅
The @action.mapping
for routing additional HTTP methods was introduced in Django Rest Framework version 3.9.0. Earlier versions with raise an AttributeError
. Try upgrading your version of DRF.
pip install djangorestframework --upgrade
Source:stackexchange.com