Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to ViewSet extra actions #5605

Merged
merged 6 commits into from
Jul 6, 2018

Commits on Jun 24, 2018

  1. View suffix already set by initializer

    Ryan P Kilby committed Jun 24, 2018
    Configuration menu
    Copy the full SHA
    06265b6 View commit details
    Browse the repository at this point in the history
  2. Add 'name' and 'description' attributes to ViewSet

    ViewSets may now provide their `name` and `description` attributes
    directly, instead of relying on view introspection to derive them.
    These attributes may also be provided with the view's initkwargs.
    
    The ViewSet `name` and `suffix` initkwargs are mutually exclusive.
    
    The `action` decorator now provides the `name` and `description` to
    the view's initkwargs. By default, these values are derived from the
    method name and its docstring. The `name` may be overridden by providing
    it as an argument to the decorator.
    
    The `get_view_name` and `get_view_description` hooks now provide the
    view instance to the handler, instead of the view class. The default
    implementations of these handlers now respect the `name`/`description`.
    Ryan P Kilby committed Jun 24, 2018
    Configuration menu
    Copy the full SHA
    d0af8e8 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2018

  1. Add 'extra actions' to ViewSet & browsable APIs

    Ryan P Kilby committed Jun 25, 2018
    Configuration menu
    Copy the full SHA
    3c60b4b View commit details
    Browse the repository at this point in the history
  2. Update simple router tests

    Removed old test logic around link/action decorators from `v2.3`. Also
    simplified the test by making the results explicit instead of computed.
    Ryan P Kilby committed Jun 25, 2018
    Configuration menu
    Copy the full SHA
    9b64818 View commit details
    Browse the repository at this point in the history
  3. Add method mapping to ViewSet actions

    Ryan P Kilby committed Jun 25, 2018
    Configuration menu
    Copy the full SHA
    f323989 View commit details
    Browse the repository at this point in the history
  4. Document extra action method mapping

    Ryan P Kilby committed Jun 25, 2018
    Configuration menu
    Copy the full SHA
    d1676f9 View commit details
    Browse the repository at this point in the history