encode/rest-framework-tutorial

Could not resolve URL for hyperlinked relationship

ibnshayed opened this issue · 3 comments

I'm getting the 2 errors while accessing the following urls

{
"snippets": "http://127.0.0.1:8000/snippets/snippets/",
"users": "http://127.0.0.1:8000/snippets/users/"
}

Error-1: Could not resolve URL for hyperlinked relationship using view name "snippet-detail". You may have failed to include the related model in your API, or incorrectly configured the lookup_field attribute on this field.

Error-2: Could not resolve URL for hyperlinked relationship using view name "user-detail". You may have failed to include the related model in your API, or incorrectly configured the lookup_field attribute on this field.

my problem is solved but it's very unsatisfied that documentation is not updated

Hi @ibnshayed — glad you solved your issue. Whilst it's fresh in your mind, a PR improving the tutorial docs is always welcomed! I'm going to close this as it's not really actionable beyond that.