django-rest-framework/docs
Ryan P Kilby 0148a9f8da Improvements to ViewSet extra actions (#5605)
* View suffix already set by initializer

* 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`.

* Add 'extra actions' to ViewSet & browsable APIs

* 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.

* Add method mapping to ViewSet actions

* Document extra action method mapping
2018-07-06 10:33:10 +02:00
..
api-guide Improvements to ViewSet extra actions (#5605) 2018-07-06 10:33:10 +02:00
img Add REST APIs with Django book (#6033) 2018-06-20 00:24:26 +01:00
topics Add REST APIs with Django book (#6033) 2018-06-20 00:24:26 +01:00
tutorial Update to Django 2.0 Routing Syntax (#6049) 2018-06-22 10:28:59 +02:00
CNAME Include CNAME file 2014-11-25 16:01:32 +00:00
index.md [docs] Remove leftover from former python 3.2/3.3 support (#5947) 2018-04-20 09:22:36 +02:00