Skip to content

Chapter 4 links - serializer method field #27

@Lcstyle

Description

@Lcstyle

Consider this an RFI,

I'm having trouble with adding links to the DRF serializers, seemingly, the "detail-view" doesn't exist anywhere, and I get a NoReverseMatch error

Reverse for 'sprint-detail' not found. 'sprint-detail' is not a valid view function or pattern name.

I am using latest django and python 3.6.

if obj.sprint_id:

if obj.sprint_id:
links['sprint'] = reverse('sprint-detail',
kwargs={'pk': obj.sprint_id}, request=request)
if obj.assigned:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions