django-rest-framework/docs/community/3.9-announcement.md
Carlton Gibson 30d6b03815 Add (beginning of) 3.9 release announcement.
@tomchristie: Input on OpenAPI and What’s Next very welcome! :)
2018-10-10 10:44:24 +02:00

2.7 KiB

Django REST framework 3.9

The 3.9 release gives access to extra actions in the Browsable API, introduces composable permissions and built-in OpenAPI schema support.


Funding

If you use REST framework commercially and would like to see this work continue, we strongly encourage you to invest in its continued development by signing up for a paid plan.

We'd like to say thanks in particular our premium backers, Rover, Sentry, Stream, Machinalis, and Rollbar.


TODO: HEADLINE FEATURES. 1, 2, 3.


Breaking Changes

TODO... (NONE???)


Deprecations

Router argument/method renamed to use basename for consistency.

  • The Router.register base_name argument has been renamed in favor of basename.
  • The Router.get_default_base_name method has been renamed in favor of Router.get_default_basename. #5990

See #5990.

base_name and get_default_base_name() are pending deprecation. They will be deprecated in 3.10 and removed entirely in 3.11.

action decorator replaces list_route and detail_route

Both list_route and detail_route are now deprecated in favour of the single action decorator. They will be removed entirely in 3.10.

The action decorator takes a boolean detail argument.

  • Replace detail_route uses with @action(detail=True).
  • Replace list_route uses with @action(detail=False).

exclude_from_schema

Both APIView.exclude_from_schema and the exclude_from_schema argument to the @api_view have now been removed.

For APIView you should instead set a schema = None attribute on the view class.

For function based views the @schema decorator can be used to exclude the view from the schema, by using @schema(None).


Minor fixes and improvements

There are a large number of minor fixes and improvements in this release. See the release notes page for a complete listing.

What's next

TODO...