|
| 1 | +<style> |
| 2 | +.promo li a { |
| 3 | + float: left; |
| 4 | + width: 130px; |
| 5 | + height: 20px; |
| 6 | + text-align: center; |
| 7 | + margin: 10px 30px; |
| 8 | + padding: 150px 0 0 0; |
| 9 | + background-position: 0 50%; |
| 10 | + background-size: 130px auto; |
| 11 | + background-repeat: no-repeat; |
| 12 | + font-size: 120%; |
| 13 | + color: black; |
| 14 | +} |
| 15 | +.promo li { |
| 16 | + list-style: none; |
| 17 | +} |
| 18 | +</style> |
| 19 | + |
| 20 | +# Django REST framework 3.9 |
| 21 | + |
| 22 | +The 3.9 release gives access to _extra actions_ in the Browsable API, introduces composable permissions and built-in [OpenAPI][openapi] schema support. |
| 23 | + |
| 24 | +--- |
| 25 | + |
| 26 | +## Funding |
| 27 | + |
| 28 | +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 |
| 29 | +**[signing up for a paid plan][funding]**. |
| 30 | + |
| 31 | +*We'd like to say thanks in particular our premium backers, [Rover](http://jobs.rover.com/), [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [Machinalis](https://hello.machinalis.co.uk/), and [Rollbar](https://rollbar.com).* |
| 32 | + |
| 33 | +--- |
| 34 | + |
| 35 | +TODO: HEADLINE FEATURES. 1, 2, 3. |
| 36 | + |
| 37 | +--- |
| 38 | + |
| 39 | +## Breaking Changes |
| 40 | + |
| 41 | +TODO... (NONE???) |
| 42 | + |
| 43 | +--- |
| 44 | + |
| 45 | +## Deprecations |
| 46 | + |
| 47 | +### Router argument/method renamed to use `basename` for consistency. |
| 48 | + |
| 49 | +* The `Router.register` `base_name` argument has been renamed in favor of `basename`. |
| 50 | +* The `Router.get_default_base_name` method has been renamed in favor of `Router.get_default_basename`. [#5990][gh5990] |
| 51 | + |
| 52 | +See [#5990][gh5990]. |
| 53 | + |
| 54 | +[gh5990]: https://github.com/encode/django-rest-framework/pull/5990 |
| 55 | + |
| 56 | +`base_name` and `get_default_base_name()` are pending deprecation. They will be deprecated in 3.10 and removed entirely in 3.11. |
| 57 | + |
| 58 | +### `action` decorator replaces `list_route` and `detail_route` |
| 59 | + |
| 60 | +Both `list_route` and `detail_route` are now deprecated in favour of the single `action` decorator. |
| 61 | +They will be removed entirely in 3.10. |
| 62 | + |
| 63 | +The `action` decorator takes a boolean `detail` argument. |
| 64 | + |
| 65 | +* Replace `detail_route` uses with `@action(detail=True)`. |
| 66 | +* Replace `list_route` uses with `@action(detail=False)`. |
| 67 | + |
| 68 | +### `exclude_from_schema` |
| 69 | + |
| 70 | +Both `APIView.exclude_from_schema` and the `exclude_from_schema` argument to the `@api_view` have now been removed. |
| 71 | + |
| 72 | +For `APIView` you should instead set a `schema = None` attribute on the view class. |
| 73 | + |
| 74 | +For function based views the `@schema` decorator can be used to exclude the view from the schema, by using `@schema(None)`. |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## Minor fixes and improvements |
| 79 | + |
| 80 | +There are a large number of minor fixes and improvements in this release. See the [release notes](release-notes.md) page |
| 81 | +for a complete listing. |
| 82 | + |
| 83 | + |
| 84 | +## What's next |
| 85 | + |
| 86 | + |
| 87 | +TODO... |
| 88 | + |
| 89 | + |
| 90 | +[funding]: funding.md |
| 91 | +[gh5886]: https://github.com/encode/django-rest-framework/issues/5886 |
| 92 | +[gh5705]: https://github.com/encode/django-rest-framework/issues/5705 |
| 93 | +[openapi]: https://www.openapis.org/ |
0 commit comments