Actions
Task #2916
closedTask #2868: Platform support for publishing.
Add Distribution serializer and viewset.
Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:
0%
Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 25
Quarter:
Description
Add Distribution serializer and viewset.
The distribution URL: repositories/<id>/publishers/<id>/distributions/
Additional work may be need to support URL nesting more than 1 level deep.
Related issues
Actions
Add Distribution ViewSet and Serializer
Additional work was done to allow arbitrarily deeply nested ViewSets.
The router registration code in urls.py was significantly changed. A
ViewSetNode
tree is assembled that mirrors the nesting hierarchy of the url structure, and is able to create child routers as necessary and use them to register child ViewSets.A
parent_viewset
attribute is added to ViewSets, which indicates how they are nested and assists in the retrieval of parents.A new type of field,
WritableNestedUrlRelatedField
was added to allow parent fields to be writable when the parent is determined by the nested url rather than by request parameters (and designatedread_only
). Serializers with writable url fields inherit fromNestedModelSerializer
.