mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
3.10 release notes tweaks
This commit is contained in:
parent
9eaf49dab9
commit
6499378fc3
|
@ -1,15 +1,30 @@
|
|||
<style>
|
||||
.promo li a {
|
||||
float: left;
|
||||
width: 130px;
|
||||
height: 20px;
|
||||
text-align: center;
|
||||
margin: 10px 30px;
|
||||
padding: 150px 0 0 0;
|
||||
background-position: 0 50%;
|
||||
background-size: 130px auto;
|
||||
background-repeat: no-repeat;
|
||||
font-size: 120%;
|
||||
color: black;
|
||||
}
|
||||
.promo li {
|
||||
list-style: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
# Django REST framework 3.10
|
||||
|
||||
## Python 3 Only.
|
||||
The 3.10 release drops support for Python 2.
|
||||
|
||||
The 3.10 release is our first to drop support for Python 2.
|
||||
* Our supported Python versions are now: 3.5, 3.6, and 3.7.
|
||||
* Our supported Django versions are now: 1.11, 2.0, 2.1, and 2.2.
|
||||
|
||||
Our supported Python versions are currently 3.5, 3.6, and 3.7.
|
||||
|
||||
Our support Django versions are currently 1.11, 2.0, 2.1, and 2.2.
|
||||
|
||||
## OpenAPI Schema Generation.
|
||||
## OpenAPI Schema Generation
|
||||
|
||||
Since we first introduced schema support in Django REST Framework 3.5, OpenAPI has emerged as the widely adopted standard for modeling Web APIs.
|
||||
|
||||
|
@ -39,35 +54,9 @@ from REST framework, scheduled for version 3.12.
|
|||
We have removed the old documentation for the CoreAPI based schema generation.
|
||||
You may view the [Legacy CoreAPI documentation here][legacy-core-api-docs].
|
||||
|
||||
---
|
||||
|
||||
**Switching mode between `CoreAPI` and `OpenAPI`**
|
||||
|
||||
Both the `generateschema` management command and `get_schema_view()` helper
|
||||
function will automatically switch between `CoreAPI` and `OpenAPI` modes,
|
||||
depending on the value of `api_settings.DEFAULT_SCHEMA_CLASS`.
|
||||
|
||||
If `api_settings.DEFAULT_SCHEMA_CLASS` is a subclass of
|
||||
`rest_framework.schemas.coreapi.AutoSchema` then `CoreAPI` mode will be
|
||||
selected. Otherwise the new `OpenAPI` will apply.
|
||||
|
||||
This means that, unless you previously overrode
|
||||
`api_settings.DEFAULT_SCHEMA_CLASS`, you automatically be opted-in to the new
|
||||
`OpenAPI` based schemas.
|
||||
|
||||
You can continue to use CoreAPI schemas by setting the appropriate default
|
||||
schema class:
|
||||
|
||||
```python
|
||||
# In settings.py
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema',
|
||||
}
|
||||
```
|
||||
|
||||
----
|
||||
|
||||
## Quickstart
|
||||
## OpenAPI Quickstart
|
||||
|
||||
You can generate a static OpenAPI schema, using the `generateschema` management
|
||||
command.
|
||||
|
@ -130,4 +119,29 @@ tooling that are driven by the OpenAPI schema. The `apistar` project has a
|
|||
significant amount of work towards this. However, if we do so, we'll plan
|
||||
on keeping any tooling outside of the core framework.
|
||||
|
||||
---
|
||||
|
||||
## Funding
|
||||
|
||||
REST framework is a *collaboratively funded project*. If you use
|
||||
REST framework commercially we strongly encourage you to invest in its
|
||||
continued development by **[signing up for a paid plan][funding]**.
|
||||
|
||||
*Every single sign-up helps us make REST framework long-term financially sustainable.*
|
||||
|
||||
<ul class="premium-promo promo">
|
||||
<li><a href="https://getsentry.com/welcome/" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/sentry130.png)">Sentry</a></li>
|
||||
<li><a href="https://getstream.io/try-the-api/?utm_source=drf&utm_medium=banner&utm_campaign=drf" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/stream-130.png)">Stream</a></li>
|
||||
<li><a href="https://software.esg-usa.com" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/esg-new-logo.png)">ESG</a></li>
|
||||
<li><a href="https://rollbar.com" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/rollbar2.png)">Rollbar</a></li>
|
||||
<li><a href="https://cadre.com" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/cadre.png)">Cadre</a></li>
|
||||
<li><a href="https://hubs.ly/H0f30Lf0" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/kloudless-plus-text.png)">Kloudless</a></li>
|
||||
<li><a href="https://lightsonsoftware.com" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/lightson-dark.png)">Lights On Software</a></li>
|
||||
</ul>
|
||||
<div style="clear: both; padding-bottom: 20px;"></div>
|
||||
|
||||
*Many thanks to all our [wonderful sponsors][sponsors], and in particular to our premium backers, [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [ESG](https://software.esg-usa.com/), [Rollbar](https://rollbar.com/?utm_source=django&utm_medium=sponsorship&utm_campaign=freetrial), [Cadre](https://cadre.com), [Kloudless](https://hubs.ly/H0f30Lf0), and [Lights On Software](https://lightsonsoftware.com).*
|
||||
|
||||
[legacy-core-api-docs]:https://github.com/encode/django-rest-framework/blob/master/docs/coreapi/index.md
|
||||
[sponsors]: https://fund.django-rest-framework.org/topics/funding/#our-sponsors
|
||||
[funding]: community/funding.md
|
||||
|
|
Loading…
Reference in New Issue
Block a user