* Add official support for Django 5.1
Following the supported Python versions:
https://docs.djangoproject.com/en/stable/faq/install/
* Add tests to cover compat with Django's 5.1 LoginRequiredMiddleware
* First pass to create DRF's LoginRequiredMiddleware
* Attempt to fix the tests
* Revert custom middleware implementation
* Disable LoginRequiredMiddleware on DRF views
* Document how to integrate DRF with LoginRequiredMiddleware
* Move login required tests under a separate test case
* Revert redundant change
* Disable LoginRequiredMiddleware on ViewSets
* Add some integrations tests to cover various view types
* url() is deprecated in Django 3.1
* update given feedbacks on url() is deprecated in Django 3.1
* Fix test_urlpatterns.py to continue testing mixed re_path() and path()
* Fix one missed reference
Co-authored-by: sanjusci <sanju.sci9@gmail.com>
* Pass data via response instead of renderer_context
Instead of relying on internal implementation details to get a reference
to the response or view, attach these directly to the returned response.
* Remove unused method
* Add suffix support for actions
Removes the newly introduced `action.name` in favor of leveraging the
View's `.get_view_name()` method, which supports both name and suffix.
* Fix view description func docstrings
* Test action decorator name & suffix kwargs
* Adjust 'extra action' docs
* 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