Deployed 2c0b2bd4 with MkDocs version: 0.16.3

This commit is contained in:
Tom Christie 2018-11-15 13:53:15 +00:00
parent 31152f0503
commit 26b1bdf09b
13 changed files with 3780 additions and 3796 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -623,7 +623,7 @@ WSGIPassAuthorization On
<pre><code>from rest_framework.authtoken.models import Token
token = Token.objects.create(user=...)
print token.key
print(token.key)
</code></pre>
<p>For clients to authenticate, the token key should be included in the <code>Authorization</code> HTTP header. The key should be prefixed by the string literal "Token", with whitespace separating the two strings. For example:</p>
<pre><code>Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b

View File

@ -626,7 +626,7 @@ response = view(request)
<h1 id="apiclient"><a class="toclink" href="#apiclient">APIClient</a></h1>
<p>Extends <a href="https://docs.djangoproject.com/en/stable/topics/testing/tools/#the-test-client">Django's existing <code>Client</code> class</a>.</p>
<h2 id="making-requests"><a class="toclink" href="#making-requests">Making requests</a></h2>
<p>The <code>APIClient</code> class supports the same request interface as Django's standard <code>Client</code> class. This means the that standard <code>.get()</code>, <code>.post()</code>, <code>.put()</code>, <code>.patch()</code>, <code>.delete()</code>, <code>.head()</code> and <code>.options()</code> methods are all available. For example:</p>
<p>The <code>APIClient</code> class supports the same request interface as Django's standard <code>Client</code> class. This means that the standard <code>.get()</code>, <code>.post()</code>, <code>.put()</code>, <code>.patch()</code>, <code>.delete()</code>, <code>.head()</code> and <code>.options()</code> methods are all available. For example:</p>
<pre><code>from rest_framework.test import APIClient
client = APIClient()

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_ltfield_namegt"><a class="toclink" href="#change-to-validate_ltfield_namegt">Change to <code>validate_&lt;field_name&gt;</code>.</a></h4>
<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>
<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_ltfield_namegt"><a class="toclink" href="#removal-of-transform_ltfield_namegt">Removal of <code>transform_&lt;field_name&gt;</code>.</a></h4>
<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>
<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

@ -577,12 +577,12 @@ They will be removed entirely in 3.10.</p>
<h3 id="exclude_from_schema"><a class="toclink" href="#exclude_from_schema"><code>exclude_from_schema</code></a></h3>
<p>Both <code>APIView.exclude_from_schema</code> and the <code>exclude_from_schema</code> argument to the <code>@api_view</code> have now been removed.</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>
<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 />
<h2 id="minor-fixes-and-improvements"><a class="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 <a href="../release-notes/">release notes</a> page for a complete listing.</p>
<h2 id="whats-next"><a class="toclink" href="#whats-next">What's next</a></h2>
<p>We're planning to iteratively working towards OpenAPI becoming the standard schema
<p>We're planning to iteratively work towards OpenAPI becoming the standard schema
representation. This will mean that the <code>coreapi</code> dependency will gradually become
removed, and we'll instead generate the schema directly, rather than building
a CoreAPI <code>Document</code> object.</p>
@ -598,7 +598,7 @@ validating API schemas, and providing a dynamic client library.</p>
with the possibility that some of this work will eventually <a href="https://www.aeracode.org/2018/06/04/django-async-roadmap/">feed back into
Django</a>.</p>
<p>There will be further work on the <a href="https://www.uvicorn.org/">Uvicorn</a>
webserver, as well as lots of functionality planned for the <a href="https://www.starlette.io/">Starlette</a>
web server, as well as lots of functionality planned for the <a href="https://www.starlette.io/">Starlette</a>
web framework, which is building a foundational set of tooling for working with
ASGI.</p>

View File

@ -506,7 +506,7 @@
<hr />
<h2 id="39x-series"><a class="toclink" href="#39x-series">3.9.x series</a></h2>
<h3 id="390"><a class="toclink" href="#390">3.9.0</a></h3>
<p><strong>Date</strong>: <a href="https://github.com/encode/django-rest-framework/milestone/66?closed=1">18st October 2018</a></p>
<p><strong>Date</strong>: <a href="https://github.com/encode/django-rest-framework/milestone/66?closed=1">18th October 2018</a></p>
<ul>
<li>Improvements to ViewSet extra actions <a href="https://github.com/encode/django-rest-framework/issues/5605">#5605</a></li>
<li>Fix <code>action</code> support for ViewSet suffixes <a href="https://github.com/encode/django-rest-framework/issues/6081">#6081</a></li>
@ -1260,7 +1260,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<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>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>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>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -542,11 +542,12 @@ continued development by <strong><a href="community/funding/">signing up for a p
<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://loadimpact.com/?utm_campaign=Sponsorship%20links&utm_source=drf&utm_medium=drf" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/load-impact.png)">Load Impact</a></li>
<li><a href="https://hubs.ly/H0f30Lf0" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/kloudless.png)">Kloudless</a></li>
<li><a href="https://lightsonsoftware.com" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/lightson.png)">Lights On Software</a></li>
</ul>
<div style="clear: both; padding-bottom: 20px;"></div>
<p><em>Many thanks to all our <a href="https://fund.django-rest-framework.org/topics/funding/#our-sponsors">wonderful sponsors</a>, and in particular to our premium backers, <a href="http://jobs.rover.com/">Rover</a>, <a href="https://getsentry.com/welcome/">Sentry</a>, <a href="https://getstream.io/?utm_source=drf&amp;utm_medium=banner&amp;utm_campaign=drf">Stream</a>, <a href="https://auklet.io/">Auklet</a>, <a href="https://rollbar.com">Rollbar</a>, <a href="https://cadre.com">Cadre</a>, <a href="https://loadimpact.com/?utm_campaign=Sponsorship%20links&amp;utm_source=drf&amp;utm_medium=drf">Load Impact</a>, and <a href="https://hubs.ly/H0f30Lf0">Kloudless</a>.</em></p>
<p><em>Many thanks to all our <a href="https://fund.django-rest-framework.org/topics/funding/#our-sponsors">wonderful sponsors</a>, and in particular to our premium backers, <a href="http://jobs.rover.com/">Rover</a>, <a href="https://getsentry.com/welcome/">Sentry</a>, <a href="https://getstream.io/?utm_source=drf&amp;utm_medium=banner&amp;utm_campaign=drf">Stream</a>, <a href="https://auklet.io/">Auklet</a>, <a href="https://rollbar.com">Rollbar</a>, <a href="https://cadre.com">Cadre</a>, <a href="https://loadimpact.com/?utm_campaign=Sponsorship%20links&amp;utm_source=drf&amp;utm_medium=drf">Load Impact</a>, <a href="https://hubs.ly/H0f30Lf0">Kloudless</a>, and <a href="https://lightsonsoftware.com">Lights On Software</a>.</em></p>
<hr />
<h2 id="requirements"><a class="toclink" href="#requirements">Requirements</a></h2>
<p>REST framework requires the following:</p>

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

View File

@ -595,18 +595,6 @@ response bodies, enum/pattern/min/max validators, form parameters, etc. - and to
generation tools like <code>swagger-codegen</code>.</p>
<p>This also translates into a very useful interactive documentation viewer in the form of <code>swagger-ui</code>:</p>
<p><img alt="Screenshot - drf-yasg" src="../../img/drf-yasg.png" /></p>
<h4 id="drf-openapi"><a class="toclink" href="#drf-openapi">DRF OpenAPI</a></h4>
<p><a href="https://github.com/limdauto/drf_openapi/">DRF OpenAPI</a> bridges the gap between OpenAPI specification and tool chain with the schema exposed
out-of-the-box by Django Rest Framework. Its goals are:</p>
<ul>
<li>To be dropped into any existing DRF project without any code change necessary.</li>
<li>Provide clear disctinction between request schema and response schema.</li>
<li>Provide a versioning mechanism for each schema. Support defining schema by version range syntax, e.g. &gt;1.0, &lt;=2.0</li>
<li>Support multiple response codes, not just 200</li>
<li>All this information should be bound to view methods, not view classes.</li>
</ul>
<p>It also tries to stay current with the maturing schema generation mechanism provided by DRF.</p>
<p><img alt="Screenshot - DRF OpenAPI" src="../../img/drf-openapi.png" /></p>
<hr />
<h4 id="drf-docs"><a class="toclink" href="#drf-docs">DRF Docs</a></h4>
<p><a href="https://github.com/ekonstantinidis/django-rest-framework-docs">DRF Docs</a> allows you to document Web APIs made with Django REST Framework and it is authored by Emmanouil Konstantinidis. It's made to work out of the box and its setup should not take more than a couple of minutes. Complete documentation can be found on the <a href="https://www.drfdocs.com/">website</a> while there is also a <a href="http://demo.drfdocs.com/">demo</a> available for people to see what it looks like. <strong>Live API Endpoints</strong> allow you to utilize the endpoints from within the documentation in a neat way.</p>

View File

@ -532,7 +532,7 @@ class UserSerializer(serializers.HyperlinkedModelSerializer):
<li>Our snippet and user serializers include <code>'url'</code> fields that by default will refer to <code>'{model_name}-detail'</code>, which in this case will be <code>'snippet-detail'</code> and <code>'user-detail'</code>.</li>
</ul>
<p>After adding all those names into our URLconf, our final <code>snippets/urls.py</code> file should look like this:</p>
<pre><code>from django.conf.urls import url, include
<pre><code>from django.urls import path
from rest_framework.urlpatterns import format_suffix_patterns
from snippets import views