<p>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
<strong><ahref="../funding/">signing up for a paid plan</a></strong>.</p>
<p><em>We'd like to say thanks in particular our premium backers, <ahref="https://www.rover.com/careers/">Rover</a>, <ahref="https://sentry.io/welcome/">Sentry</a>, <ahref="https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf">Stream</a>, <ahref="https://machinalis.com/">Machinalis</a>, and <ahref="https://rollbar.com">Rollbar</a>.</em></p>
<h3id="altered-the-behaviour-of-read_only-plus-default-on-field"><aclass="toclink"href="#altered-the-behaviour-of-read_only-plus-default-on-field">Altered the behaviour of <code>read_only</code> plus <code>default</code> on Field.</a></h3>
<p><ahref="https://github.com/encode/django-rest-framework/issues/5886">#5886</a><code>read_only</code> fields will now <strong>always</strong> be excluded from writable fields.</p>
<p>Previously <code>read_only</code> fields when combined with a <code>default</code> value would use the <code>default</code> for create and update
operations. This was counter-intuitive in some circumstances and led to difficulties supporting dotted <code>source</code>
attributes on nullable relations.</p>
<p>In order to maintain the old behaviour you may need to pass the value of <code>read_only</code> fields when calling <code>save()</code> in
the view:</p>
<pre><code>def perform_create(self, serializer):
serializer.save(owner=self.request.user)
</code></pre>
<p>Alternatively you may override <code>save()</code> or <code>create()</code> or <code>update()</code> on the serializer as appropriate.</p>
<h3id="action-decorator-replaces-list_route-and-detail_route"><aclass="toclink"href="#action-decorator-replaces-list_route-and-detail_route"><code>action</code> decorator replaces <code>list_route</code> and <code>detail_route</code></a></h3>
<p><ahref="https://github.com/encode/django-rest-framework/issues/5705">#5705</a><code>list_route</code> and <code>detail_route</code> have been merge into a single <code>action</code> decorator. This improves viewset action introspection, and will allow extra actions to be displayed in the Browsable API in future versions.</p>
<p>Both <code>list_route</code> and <code>detail_route</code> are now pending deprecation. They will be deprecated in 3.9 and removed entirely
in 3.10.</p>
<p>The new <code>action</code> decorator takes a boolean <code>detail</code> argument.</p>
<ul>
<li>Replace <code>detail_route</code> uses with <code>@action(detail=True)</code>.</li>
<li>Replace <code>list_route</code> uses with <code>@action(detail=False)</code>.</li>
<p>Both <code>APIView.exclude_from_schema</code> and the <code>exclude_from_schema</code> argument to the <code>@api_view</code> decorator are now deprecated. They will be removed entirely in 3.9.</p>
<p>For <code>APIView</code> you should instead set a <code>schema = None</code> attribute on the view class.</p>
<p>For function based views the <code>@schema</code> decorator can be used to exclude the view from the schema, by using <code>@schema(None)</code>.</p>
<hr/>
<h2id="minor-fixes-and-improvements"><aclass="toclink"href="#minor-fixes-and-improvements">Minor fixes and improvements</a></h2>
<p>There are a large number of minor fixes and improvements in this release. See the <ahref="../release-notes/">release notes</a> page
<p>We're currently working towards moving to using <ahref="https://www.openapis.org/">OpenAPI</a> as our default schema output. We'll also be revisiting our API documentation generation and client libraries.</p>
<p>We're doing some consolidation in order to make this happen. It's planned that 3.9 will drop the <code>coreapi</code> and <code>coreschema</code> libraries, and instead use <code>apistar</code> for the API documentation generation, schema generation, and API client libraries.</p>