Django Rest Framework - Could not resolve URL for hyperlinked relationship using view name “user-detail”

前端 未结 17 1381
感动是毒
感动是毒 2020-11-28 03:11

I am building a project in Django Rest Framework where users can login to view their wine cellar. My ModelViewSets were working just fine and all of a sudden I get this frus

17条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-28 03:43

    I had the same problem , I think you should check your

    get_absolute_url

    object model's method input value (**kwargs) title. and use exact field name in lookup_field

提交回复
热议问题