-
Notifications
You must be signed in to change notification settings - Fork 181
/musics/views.py中的detail函数 #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@CrisJk requirements.txt 中有指定 django<2.0, 如果你是安裝 django 2.0 ,的確會遇到類似的問題, |
@twtrubiks 确实是我没有仔细看requirements.txt,谢谢你的辛苦创作 |
谢谢分享 |
碰到一模一樣的問題,還好有找到這裡,感謝分享 |
我也遇到这个问题了,困扰了一天,解决办法确实是改个名字,头大~~~ |
新的框架中取消了
from rest_framework.decorators import detail_route, list_route
,改成了from rest_framework.decorators import action
.@detail_route(methods=['get'])
def detail(self, request, pk=None):
这句会报TypeError, bool object is not callable错误
解决办法是更改函数名detail
我在运行这个tutorial的时候花了近30分钟的时间才找到这个错误,希望后面学习的人可以避免这个问题
The text was updated successfully, but these errors were encountered: