django-rest-framework/docs/api-guide
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
..
authentication.md Update the http signature auth library ref link (#5997) 2018-05-22 12:22:09 +01:00
caching.md Remove unused links from docs (#5735) 2018-01-15 15:03:44 +01:00
content-negotiation.md Prefer https protocol for links in docs when available 2018-01-15 15:15:21 +01:00
exceptions.md Fix exceptions.md (#6003) 2018-05-25 10:42:22 +01:00
fields.md min_value/max_value support in DurationField (#5643) 2018-04-24 09:24:05 +02:00
filtering.md Added import statement on filtering docs 2018-05-06 00:02:09 -03:00
format-suffixes.md Replace "class based views" occurrences with "class-based views" (#4251) 2016-07-08 08:38:50 +01:00
generic-views.md Clean up all whitespace throughout project (#5578) 2017-11-09 20:57:53 +01:00
metadata.md Rework dynamic list/detail actions (#5705) 2018-01-25 09:40:49 +01:00
pagination.md (fix) link to disqus article on cursor pagination (#6020) 2018-06-12 10:34:28 +01:00
parsers.md Prefer https protocol for links in docs when available 2018-01-15 15:15:21 +01:00
permissions.md Add Django Rest Framework Role Filters to Third party packages (#5809) 2018-02-08 09:04:51 +01:00
relations.md Documentation: Correct the signature for HyperlinkedRelatedField.get_object() 2018-06-13 16:39:28 +12:00
renderers.md Prefer https protocol for links in docs when available 2018-01-15 15:15:21 +01:00
requests.md Fix AttributeError hiding on request authenticators (#5600) 2017-11-23 08:58:04 +01:00
responses.md Fix doc Response data attribute description 2017-08-23 21:30:56 -05:00
reverse.md Prefer https protocol for links in docs when available 2018-01-15 15:15:21 +01:00
routers.md Fix url for group_names action example (#6036) 2018-06-21 04:29:05 -04:00
schemas.md Add schema to ObtainAuthToken 2018-02-05 16:16:42 +01:00
serializers.md Update link to django-rest-marshmallow docs (#5925) 2018-04-09 16:48:18 +02:00
settings.md Improvements to ViewSet extra actions (#5605) 2018-07-06 10:33:10 +02:00
status-codes.md Prefer https protocol for links in docs when available 2018-01-15 15:15:21 +01:00
testing.md update testing.md - fixes related to RequestsClient (#5959) 2018-04-26 12:47:38 +01:00
throttling.md Updated Rate Limiting Cite 2018-03-19 14:24:21 +05:30
validators.md required extra argument should be a boolean, not a string. (fixes #5906) 2018-03-28 12:39:18 +02:00
versioning.md Refer to "NamespaceVersioning" instead of "NamespacedVersioning" in the documentation (#5754) 2018-01-29 15:33:14 +01:00
views.md Prefer https protocol for links in docs when available 2018-01-15 15:15:21 +01:00
viewsets.md Improvements to ViewSet extra actions (#5605) 2018-07-06 10:33:10 +02:00