Deployed b1c4d8b5 with MkDocs version: 0.16.3

This commit is contained in:
Carlton Gibson 2019-05-10 20:15:54 +01:00
parent 65bf134c46
commit b4204cfb11
4 changed files with 79 additions and 71 deletions

View File

@ -579,7 +579,7 @@ def create(self, validated_data):
<p>The reason behind this is that Django's <code>ValidationError</code> class is intended for use with HTML forms and its API makes using it slightly awkward with nested validation errors that can occur in serializers.</p>
<p>For most users this change shouldn't require any updates to your codebase, but it is worth ensuring that whenever raising validation errors you should prefer using the <code>serializers.ValidationError</code> exception class, and not Django's built-in exception.</p>
<p>We strongly recommend that you use the namespaced import style of <code>import serializers</code> and not <code>from serializers import ValidationError</code> in order to avoid any potential confusion.</p>
<h4 id="change-to-validate_field_name"><a class="toclink" href="#change-to-validate_field_name">Change to <code>validate_&lt;field_name&gt;</code>.</a></h4>
<h4 id="change-to-validate_ltfield_namegt"><a class="toclink" href="#change-to-validate_ltfield_namegt">Change to <code>validate_&lt;field_name&gt;</code>.</a></h4>
<p>The <code>validate_&lt;field_name&gt;</code> method hooks that can be attached to serializer classes change their signature slightly and return type. Previously these would take a dictionary of all incoming data, and a key representing the field name, and would return a dictionary including the validated data for that field:</p>
<pre><code>def validate_score(self, attrs, source):
if attrs['score'] % 10 != 0:
@ -605,7 +605,7 @@ def create(self, validated_data):
raise serializers.ValidationError({'my_field': 'A field error'})
</code></pre>
<p>This ensures you can still write validation that compares all the input fields, but that marks the error against a particular field.</p>
<h4 id="removal-of-transform_field_name"><a class="toclink" href="#removal-of-transform_field_name">Removal of <code>transform_&lt;field_name&gt;</code>.</a></h4>
<h4 id="removal-of-transform_ltfield_namegt"><a class="toclink" href="#removal-of-transform_ltfield_namegt">Removal of <code>transform_&lt;field_name&gt;</code>.</a></h4>
<p>The under-used <code>transform_&lt;field_name&gt;</code> on serializer classes is no longer provided. Instead you should just override <code>to_representation()</code> if you need to apply any modifications to the representation style.</p>
<p>For example:</p>
<pre><code>def to_representation(self, instance):

View File

@ -505,6 +505,9 @@
</code></pre>
<hr />
<h2 id="39x-series"><a class="toclink" href="#39x-series">3.9.x series</a></h2>
<h3 id="394"><a class="toclink" href="#394">3.9.4</a></h3>
<p><strong>Date</strong>: [10th May 2019]</p>
<p>This is a maintenance release that fixes an error handling bug under Python 2.</p>
<h3 id="393"><a class="toclink" href="#393">3.9.3</a></h3>
<p><strong>Date</strong>: [29th April 2019]</p>
<p>This is the last Django REST Framework release that will support Python 2.
@ -1295,7 +1298,7 @@ Previously may have been stored internally as <code>None</code>.</p>
<li>Added regex style to <code>SearchFilter</code>. (<a href="https://github.com/encode/django-rest-framework/issues/3316">#3316</a>)</li>
<li>Resolve issues with setting blank HTML fields. (<a href="https://github.com/encode/django-rest-framework/issues/3318">#3318</a>) (<a href="https://github.com/encode/django-rest-framework/issues/3321">#3321</a>)</li>
<li>Correctly display existing 'select multiple' values in browsable API forms. (<a href="https://github.com/encode/django-rest-framework/issues/3290">#3290</a>)</li>
<li>Resolve duplicated validation message for <code>IPAddressField</code>. ([#3249[gh3249]) (<a href="https://github.com/encode/django-rest-framework/issues/3250">#3250</a>)</li>
<li>Resolve duplicated validation message for <code>IPAddressField</code>. ([#3249<a href="https://github.com/encode/django-rest-framework/issues/3249">gh3249</a>) (<a href="https://github.com/encode/django-rest-framework/issues/3250">#3250</a>)</li>
<li>Fix to ensure admin renderer continues to work when pagination is disabled. (<a href="https://github.com/encode/django-rest-framework/issues/3275">#3275</a>)</li>
<li>Resolve error with <code>LimitOffsetPagination</code> when count=0, offset=0. (<a href="https://github.com/encode/django-rest-framework/issues/3303">#3303</a>)</li>
</ul>

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
<url>
<loc>https://www.django-rest-framework.org//</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
@ -13,49 +13,49 @@
<url>
<loc>https://www.django-rest-framework.org//tutorial/quickstart/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//tutorial/1-serialization/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//tutorial/2-requests-and-responses/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//tutorial/3-class-based-views/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//tutorial/4-authentication-and-permissions/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//tutorial/5-relationships-and-hyperlinked-apis/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//tutorial/6-viewsets-and-routers/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//tutorial/7-schemas-and-client-libraries/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
@ -65,169 +65,169 @@
<url>
<loc>https://www.django-rest-framework.org//api-guide/requests/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/responses/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/views/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/generic-views/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/viewsets/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/routers/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/parsers/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/renderers/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/serializers/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/fields/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/relations/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/validators/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/authentication/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/permissions/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/caching/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/throttling/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/filtering/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/pagination/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/versioning/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/content-negotiation/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/metadata/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/schemas/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/format-suffixes/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/reverse/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/exceptions/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/status-codes/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/testing/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//api-guide/settings/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
@ -237,49 +237,49 @@
<url>
<loc>https://www.django-rest-framework.org//topics/documenting-your-api/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//topics/api-clients/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//topics/internationalization/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//topics/ajax-csrf-cors/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//topics/html-and-forms/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//topics/browser-enhancements/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//topics/browsable-api/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//topics/rest-hypermedia-hateoas/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
@ -289,115 +289,115 @@
<url>
<loc>https://www.django-rest-framework.org//community/tutorials-and-resources/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/third-party-packages/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/contributing/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/project-management/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/release-notes/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/3.9-announcement/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/3.8-announcement/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/3.7-announcement/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/3.6-announcement/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/3.5-announcement/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/3.4-announcement/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/3.3-announcement/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/3.2-announcement/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/3.1-announcement/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/3.0-announcement/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/kickstarter-announcement/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/mozilla-grant/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/funding/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://www.django-rest-framework.org//community/jobs/</loc>
<lastmod>2019-04-29</lastmod>
<lastmod>2019-05-10</lastmod>
<changefreq>daily</changefreq>
</url>