Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Move thedetail_route /list_route lists back toViewSet #2934

Closed
@xordoquy

Description

@xordoquy

During a workshop on Django REST framework, I realized the browsable API doesn't have links to thelist_route /detail_route actions.
While I started working on implementing it I realized it should be theViewSet responsibility to provide a list of custom actions. Currently all the work is done by the Router.

I'm opening the issue to discuss the possible directions.
My first though was to move the code that gathers the custom actions to theViewSet. However, I'm not too happy with it as it relies on theViewSet members having or not abind_to_methods attribute attached.
My proposal would be to have two lists (possibly dictionaries) within theViewSet that do hold thelist_route anddetail_route members. The decorator would then register their member to theViewSet.

Thoughts ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp