Deployed fed85bc with MkDocs version: 0.16.2

This commit is contained in:
Carlton Gibson 2017-08-22 14:31:16 +01:00
parent ab439680ad
commit 3530d134ea
25 changed files with 3650 additions and 3559 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -416,6 +416,10 @@
<a href="#sessionauthentication">SessionAuthentication</a>
</li>
<li>
<a href="#remoteuserauthentication">RemoteUserAuthentication</a>
</li>
<li class="main">
<a href="#custom-authentication">Custom authentication</a>
@ -662,6 +666,16 @@ and include them using the <code>throttle_classes</code> attribute.</p>
TokenAdmin.raw_id_fields = ('user',)
</code></pre>
<h4 id="using-django-managepy-command"><a class="toclink" href="#using-django-managepy-command">Using Django manage.py command</a></h4>
<p>Since version 3.6.4 it's possible to generate a user token using the following command:</p>
<pre><code>./manage.py drf_create_token &lt;username&gt;
</code></pre>
<p>this command will return the API token for the given user, creating it if it doesn't exist:</p>
<pre><code>Generated token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b for user user1
</code></pre>
<p>In case you want to regenerate the token (for example if it has been compromised or leaked) you can pass an additional parameter:</p>
<pre><code>./manage.py drf_create_token -r &lt;username&gt;
</code></pre>
<h2 id="sessionauthentication"><a class="toclink" href="#sessionauthentication">SessionAuthentication</a></h2>
<p>This authentication scheme uses Django's default session backend for authentication. Session authentication is appropriate for AJAX clients that are running in the same session context as your website.</p>
<p>If successfully authenticated, <code>SessionAuthentication</code> provides the following credentials.</p>
@ -673,6 +687,23 @@ TokenAdmin.raw_id_fields = ('user',)
<p>If you're using an AJAX style API with SessionAuthentication, you'll need to make sure you include a valid CSRF token for any "unsafe" HTTP method calls, such as <code>PUT</code>, <code>PATCH</code>, <code>POST</code> or <code>DELETE</code> requests. See the <a href="https://docs.djangoproject.com/en/stable/ref/csrf/#ajax">Django CSRF documentation</a> for more details.</p>
<p><strong>Warning</strong>: Always use Django's standard login view when creating login pages. This will ensure your login views are properly protected.</p>
<p>CSRF validation in REST framework works slightly differently to standard Django due to the need to support both session and non-session based authentication to the same views. This means that only authenticated requests require CSRF tokens, and anonymous requests may be sent without CSRF tokens. This behaviour is not suitable for login views, which should always have CSRF validation applied.</p>
<h2 id="remoteuserauthentication"><a class="toclink" href="#remoteuserauthentication">RemoteUserAuthentication</a></h2>
<p>This authentication scheme allows you to delegate authentication to your web server, which sets the <code>REMOTE_USER</code>
environment variable.</p>
<p>To use it, you must have <code>django.contrib.auth.backends.RemoteUserBackend</code> (or a subclass) in your
<code>AUTHENTICATION_BACKENDS</code> setting. By default, <code>RemoteUserBackend</code> creates <code>User</code> objects for usernames that don't
already exist. To change this and other behaviour, consult the
<a href="https://docs.djangoproject.com/en/stable/howto/auth-remote-user/">Django documentation</a>.</p>
<p>If successfully authenticated, <code>RemoteUserAuthentication</code> provides the following credentials:</p>
<ul>
<li><code>request.user</code> will be a Django <code>User</code> instance.</li>
<li><code>request.auth</code> will be <code>None</code>.</li>
</ul>
<p>Consult your web server's documentation for information about configuring an authentication method, e.g.:</p>
<ul>
<li><a href="https://httpd.apache.org/docs/2.4/howto/auth.html">Apache Authentication How-To</a></li>
<li><a href="https://www.nginx.com/resources/admin-guide/#restricting_access">NGINX (Restricting Access)</a></li>
</ul>
<h1 id="custom-authentication"><a class="toclink" href="#custom-authentication">Custom authentication</a></h1>
<p>To implement a custom authentication scheme, subclass <code>BaseAuthentication</code> and override the <code>.authenticate(self, request)</code> method. The method should return a two-tuple of <code>(user, auth)</code> if authentication succeeds, or <code>None</code> otherwise.</p>
<p>In some circumstances instead of returning <code>None</code>, you may want to raise an <code>AuthenticationFailed</code> exception from the <code>.authenticate()</code> method.</p>
@ -719,7 +750,7 @@ class ExampleAuthentication(authentication.BaseAuthentication):
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'oauth2_provider.ext.rest_framework.OAuth2Authentication',
'oauth2_provider.contrib.rest_framework.OAuth2Authentication',
)
}
</code></pre>
@ -737,7 +768,7 @@ REST_FRAMEWORK = {
<h2 id="django-oauth2-consumer"><a class="toclink" href="#django-oauth2-consumer">Django OAuth2 Consumer</a></h2>
<p>The <a href="https://github.com/Rediker-Software/doac">Django OAuth2 Consumer</a> library from <a href="https://github.com/Rediker-Software">Rediker Software</a> is another package that provides <a href="https://github.com/Rediker-Software/doac/blob/master/docs/integrations.md#">OAuth 2.0 support for REST framework</a>. The package includes token scoping permissions on tokens, which allows finer-grained access to your API.</p>
<h2 id="json-web-token-authentication"><a class="toclink" href="#json-web-token-authentication">JSON Web Token Authentication</a></h2>
<p>JSON Web Token is a fairly new standard which can be used for token-based authentication. Unlike the built-in TokenAuthentication scheme, JWT Authentication doesn't need to use a database to validate a token. <a href="https://github.com/GetBlimp">Blimp</a> maintains the <a href="https://github.com/GetBlimp/django-rest-framework-jwt">djangorestframework-jwt</a> package which provides a JWT Authentication class as well as a mechanism for clients to obtain a JWT given the username and password.</p>
<p>JSON Web Token is a fairly new standard which can be used for token-based authentication. Unlike the built-in TokenAuthentication scheme, JWT Authentication doesn't need to use a database to validate a token. <a href="https://github.com/GetBlimp">Blimp</a> maintains the <a href="https://github.com/GetBlimp/django-rest-framework-jwt">djangorestframework-jwt</a> package which provides a JWT Authentication class as well as a mechanism for clients to obtain a JWT given the username and password. An alternative package for JWT authentication is <a href="https://github.com/davesque/django-rest-framework-simplejwt">djangorestframework-simplejwt</a> which provides different features as well as a pluggable token blacklist app.</p>
<h2 id="hawk-http-authentication"><a class="toclink" href="#hawk-http-authentication">Hawk HTTP Authentication</a></h2>
<p>The <a href="https://hawkrest.readthedocs.io/en/latest/">HawkREST</a> library builds on the <a href="https://mohawk.readthedocs.io/en/latest/">Mohawk</a> library to let you work with <a href="https://github.com/hueniverse/hawk">Hawk</a> signed requests and responses in your API. <a href="https://github.com/hueniverse/hawk">Hawk</a> lets two parties securely communicate with each other using messages signed by a shared key. It is based on <a href="http://tools.ietf.org/html/draft-hammer-oauth-v2-mac-token-05">HTTP MAC access authentication</a> (which was based on parts of <a href="http://oauth.net/core/1.0a">OAuth 1.0</a>).</p>
<h2 id="http-signature-authentication"><a class="toclink" href="#http-signature-authentication">HTTP Signature Authentication</a></h2>

View File

@ -464,7 +464,7 @@
<h1 id="exceptions"><a class="toclink" href="#exceptions">Exceptions</a></h1>
<blockquote>
<p>Exceptions… allow error handling to be organized cleanly in a central or high-level place within the program structure.</p>
<p>&mdash; Doug Hellmann, <a href="http://www.doughellmann.com/articles/how-tos/python-exception-handling/index.html">Python Exception Handling Techniques</a></p>
<p>&mdash; Doug Hellmann, <a href="https://doughellmann.com/blog/2009/06/19/python-exception-handling-techniques/">Python Exception Handling Techniques</a></p>
</blockquote>
<h2 id="exception-handling-in-rest-framework-views"><a class="toclink" href="#exception-handling-in-rest-framework-views">Exception handling in REST framework views</a></h2>
<p>REST framework's views handle various exceptions, and deal with returning appropriate error responses.</p>

View File

@ -802,7 +802,7 @@ color_channel = serializers.ChoiceField(
<h4 id="datetimefield-format-strings"><a class="toclink" href="#datetimefield-format-strings"><code>DateTimeField</code> format strings.</a></h4>
<p>Format strings may either be <a href="https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior">Python strftime formats</a> which explicitly specify the format, or the special string <code>'iso-8601'</code>, which indicates that <a href="http://www.w3.org/TR/NOTE-datetime">ISO 8601</a> style datetimes should be used. (eg <code>'2013-01-29T12:34:56.000000Z'</code>)</p>
<p>When a value of <code>None</code> is used for the format <code>datetime</code> objects will be returned by <code>to_representation</code> and the final output representation will determined by the renderer class.</p>
<h4 id="auto_now-and-auto_now_add-model-fields"><a class="toclink" href="#auto_now-and-auto_now_add-model-fields"><code>auto_now</code> and <code>auto_now_add</code> model fields.</a></h4>
<h4 id="auto_now-and-auto_now_add-model-fields"><code>auto_now_add</code> model fields.<a class="toclink" href="#auto_now-and-auto_now_add-model-fields"><code>auto_now</code> and </a></h4>
<p>When using <code>ModelSerializer</code> or <code>HyperlinkedModelSerializer</code>, note that any model fields with <code>auto_now=True</code> or <code>auto_now_add=True</code> will use serializer fields that are <code>read_only=True</code> by default.</p>
<p>If you want to override this behavior, you'll need to declare the <code>DateTimeField</code> explicitly on the serializer. For example:</p>
<pre><code>class CommentSerializer(serializers.ModelSerializer):
@ -889,7 +889,7 @@ Django's regular <a href="https://docs.djangoproject.com/en/stable/ref/settings/
<h1 id="composite-fields"><a class="toclink" href="#composite-fields">Composite fields</a></h1>
<h2 id="listfield"><a class="toclink" href="#listfield">ListField</a></h2>
<p>A field class that validates a list of objects.</p>
<p><strong>Signature</strong>: <code>ListField(child, min_length=None, max_length=None)</code></p>
<p><strong>Signature</strong>: <code>ListField(child=&lt;A_FIELD_INSTANCE&gt;, min_length=None, max_length=None)</code></p>
<ul>
<li><code>child</code> - A field instance that should be used for validating the objects in the list. If this argument is not provided then objects in the list will not be validated.</li>
<li><code>min_length</code> - Validates that the list contains no fewer than this number of elements.</li>
@ -907,7 +907,7 @@ Django's regular <a href="https://docs.djangoproject.com/en/stable/ref/settings/
<p>We can now reuse our custom <code>StringListField</code> class throughout our application, without having to provide a <code>child</code> argument to it.</p>
<h2 id="dictfield"><a class="toclink" href="#dictfield">DictField</a></h2>
<p>A field class that validates a dictionary of objects. The keys in <code>DictField</code> are always assumed to be string values.</p>
<p><strong>Signature</strong>: <code>DictField(child)</code></p>
<p><strong>Signature</strong>: <code>DictField(child=&lt;A_FIELD_INSTANCE&gt;)</code></p>
<ul>
<li><code>child</code> - A field instance that should be used for validating the values in the dictionary. If this argument is not provided then values in the mapping will not be validated.</li>
</ul>
@ -1053,7 +1053,7 @@ def to_internal_value(self, data):
return Color(red, green, blue)
</code></pre>
<p>This style keeps you error messages more cleanly separated from your code, and should be preferred.</p>
<p>This style keeps your error messages cleaner and more separated from your code, and should be preferred.</p>
<h1 id="third-party-packages"><a class="toclink" href="#third-party-packages">Third party packages</a></h1>
<p>The following third party packages are also available.</p>
<h2 id="drf-compound-fields"><a class="toclink" href="#drf-compound-fields">DRF Compound Fields</a></h2>

View File

@ -623,7 +623,7 @@ class UserListView(generics.ListAPIView):
<pre><code>class ProductList(generics.ListAPIView):
queryset = Product.objects.all()
serializer_class = ProductSerializer
filter_backends = (filters.DjangoFilterBackend,)
filter_backends = (DjangoFilterBackend,)
filter_fields = ('category', 'in_stock')
</code></pre>
<p>This will automatically create a <code>FilterSet</code> class for the given fields, and will allow you to make requests such as:</p>

View File

@ -776,7 +776,7 @@ class BaseRetrieveUpdateDestroyView(MultipleFieldLookupMixin,
<h2 id="django-rest-framework-bulk"><a class="toclink" href="#django-rest-framework-bulk">Django REST Framework bulk</a></h2>
<p>The <a href="https://github.com/miki725/django-rest-framework-bulk">django-rest-framework-bulk package</a> implements generic view mixins as well as some common concrete generic views to allow to apply bulk operations via API requests.</p>
<h2 id="django-rest-multiple-models"><a class="toclink" href="#django-rest-multiple-models">Django Rest Multiple Models</a></h2>
<p><a href="https://github.com/Axiologue/DjangoRestMultipleModels">Django Rest Multiple Models</a> provides a generic view (and mixin) for sending multiple serialized models and/or querysets via a single API request.</p>
<p><a href="https://github.com/MattBroach/DjangoRestMultipleModels">Django Rest Multiple Models</a> provides a generic view (and mixin) for sending multiple serialized models and/or querysets via a single API request.</p>
</div> <!--/span-->

View File

@ -418,10 +418,6 @@
<a href="#example">Example</a>
</li>
<li>
<a href="#header-based-pagination">Header based pagination</a>
</li>
<li>
<a href="#using-your-custom-pagination-class">Using your custom pagination class</a>
</li>
@ -454,6 +450,10 @@
<a href="#drf-proxy-pagination">drf-proxy-pagination</a>
</li>
<li>
<a href="#link-header-pagination">link-header-pagination</a>
</li>
<div class="promo">
@ -661,27 +661,6 @@ class StandardResultsSetPagination(PageNumberPagination):
}
</code></pre>
<p>Note that if you care about how the ordering of keys is displayed in responses in the browsable API you might choose to use an <code>OrderedDict</code> when constructing the body of paginated responses, but this is optional.</p>
<h2 id="header-based-pagination"><a class="toclink" href="#header-based-pagination">Header based pagination</a></h2>
<p>Let's modify the built-in <code>PageNumberPagination</code> style, so that instead of include the pagination links in the body of the response, we'll instead include a <code>Link</code> header, in a <a href="https://developer.github.com/guides/traversing-with-pagination/">similar style to the GitHub API</a>.</p>
<pre><code>class LinkHeaderPagination(pagination.PageNumberPagination):
def get_paginated_response(self, data):
next_url = self.get_next_link()
previous_url = self.get_previous_link()
if next_url is not None and previous_url is not None:
link = '&lt;{next_url}&gt;; rel="next", &lt;{previous_url}&gt;; rel="prev"'
elif next_url is not None:
link = '&lt;{next_url}&gt;; rel="next"'
elif previous_url is not None:
link = '&lt;{previous_url}&gt;; rel="prev"'
else:
link = ''
link = link.format(next_url=next_url, previous_url=previous_url)
headers = {'Link': link} if link else {}
return Response(data, headers=headers)
</code></pre>
<h2 id="using-your-custom-pagination-class"><a class="toclink" href="#using-your-custom-pagination-class">Using your custom pagination class</a></h2>
<p>To have your custom pagination class be used by default, use the <code>DEFAULT_PAGINATION_CLASS</code> setting:</p>
<pre><code>REST_FRAMEWORK = {
@ -719,6 +698,8 @@ that REST framework provides, by implementing a <code>get_schema_fields()</code>
<p>The <a href="http://chibisov.github.io/drf-extensions/docs/"><code>DRF-extensions</code> package</a> includes a <a href="http://chibisov.github.io/drf-extensions/docs/#paginatebymaxmixin"><code>PaginateByMaxMixin</code> mixin class</a> that allows your API clients to specify <code>?page_size=max</code> to obtain the maximum allowed page size.</p>
<h2 id="drf-proxy-pagination"><a class="toclink" href="#drf-proxy-pagination">drf-proxy-pagination</a></h2>
<p>The <a href="https://github.com/tuffnatty/drf-proxy-pagination"><code>drf-proxy-pagination</code> package</a> includes a <code>ProxyPagination</code> class which allows to choose pagination class with a query parameter.</p>
<h2 id="link-header-pagination"><a class="toclink" href="#link-header-pagination">link-header-pagination</a></h2>
<p>The <a href="https://github.com/tbeadle/django-rest-framework-link-header-pagination"><code>django-rest-framework-link-header-pagination</code> package</a> includes a <code>LinkHeaderPagination</code> class which provides pagination via an HTTP <code>Link</code> header as desribed in <a href="../github-link-pagination">Github's developer documentation</a>.</p>
</div> <!--/span-->

View File

@ -617,7 +617,7 @@ This behavior can be modified by setting the <code>trailing_slash</code> argumen
<pre><code>router = DefaultRouter(trailing_slash=False)
</code></pre>
<h1 id="custom-routers"><a class="toclink" href="#custom-routers">Custom Routers</a></h1>
<p>Implementing a custom router isn't something you'd need to do very often, but it can be useful if you have specific requirements about how the your URLs for your API are structured. Doing so allows you to encapsulate the URL structure in a reusable way that ensures you don't have to write your URL patterns explicitly for each new view.</p>
<p>Implementing a custom router isn't something you'd need to do very often, but it can be useful if you have specific requirements about how the URLs for your API are structured. Doing so allows you to encapsulate the URL structure in a reusable way that ensures you don't have to write your URL patterns explicitly for each new view.</p>
<p>The simplest way to implement a custom router is to subclass one of the existing router classes. The <code>.routes</code> attribute is used to template the URL patterns that will be mapped to each viewset. The <code>.routes</code> attribute is a list of <code>Route</code> named tuples.</p>
<p>The arguments to the <code>Route</code> named tuple are:</p>
<p><strong>url</strong>: A string representing the URL to be routed. May include the following format strings:</p>

View File

@ -557,7 +557,9 @@ add a schema to your API, depending on exactly what you need.</p>
<h2 id="the-get_schema_view-shortcut"><a class="toclink" href="#the-get_schema_view-shortcut">The get_schema_view shortcut</a></h2>
<p>The simplest way to include a schema in your project is to use the
<code>get_schema_view()</code> function.</p>
<pre><code>schema_view = get_schema_view(title="Server Monitoring API")
<pre><code>from rest_framework.schemas import get_schema_view
schema_view = get_schema_view(title="Server Monitoring API")
urlpatterns = [
url('^$', schema_view),
@ -601,7 +603,8 @@ ROOT_URLCONF setting.</p>
</code></pre>
<h4 id="renderer_classes"><a class="toclink" href="#renderer_classes"><code>renderer_classes</code></a></h4>
<p>May be used to pass the set of renderer classes that can be used to render the API root endpoint.</p>
<pre><code>from rest_framework.renderers import CoreJSONRenderer
<pre><code>from rest_framework.schemas import get_schema_view
from rest_framework.renderers import CoreJSONRenderer
from my_custom_package import APIBlueprintRenderer
schema_view = get_schema_view(
@ -623,6 +626,9 @@ schema_view = get_schema_view(
patterns=schema_url_patterns,
)
</code></pre>
<h4 id="generator_class"><a class="toclink" href="#generator_class"><code>generator_class</code></a></h4>
<p>May be used to specify a <code>SchemaGenerator</code> subclass to be passed to the
<code>SchemaView</code>.</p>
<h2 id="using-an-explicit-schema-view"><a class="toclink" href="#using-an-explicit-schema-view">Using an explicit schema view</a></h2>
<p>If you need a little more control than the <code>get_schema_view()</code> shortcut gives you,
then you can use the <code>SchemaGenerator</code> class directly to auto-generate the

View File

@ -570,7 +570,7 @@ response = view(request)
<p>For example, when forcibly authenticating using a token, you might do something like the following:</p>
<pre><code>user = User.objects.get(username='olivia')
request = factory.get('/accounts/django-superstars/')
force_authenticate(request, user=user, token=user.token)
force_authenticate(request, user=user, token=user.auth_token)
</code></pre>
<hr />
<p><strong>Note</strong>: When using <code>APIRequestFactory</code>, the object that is returned is Django's standard <code>HttpRequest</code>, and not REST framework's <code>Request</code> object, which is only generated once the view is called.</p>

View File

@ -455,6 +455,7 @@
<pre><code>from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import authentication, permissions
from django.contrib.auth.models import User
class ListUsers(APIView):
"""

View File

@ -484,7 +484,7 @@ user_detail = UserViewSet.as_view({'get': 'retrieve'})
from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register(r'users', UserViewSet)
router.register(r'users', UserViewSet, base_name='user')
urlpatterns = router.urls
</code></pre>
<p>Rather than writing your own viewsets, you'll often want to use the existing base classes that provide a default set of behavior. For example:</p>

View File

@ -536,12 +536,11 @@ continued development by <strong><a href="topics/funding/">signing up for a paid
<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://hello.machinalis.co.uk/" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/Machinalis130.png)">Machinalis</a></li>
<li><a href="https://rollbar.com" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/rollbar.png)">Rollbar</a></li>
<li><a href="https://micropyramid.com/django-rest-framework-development-services/" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/mp-text-logo.png)">MicroPyramid</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://hello.machinalis.co.uk/">Machinalis</a>, <a href="https://rollbar.com">Rollbar</a>, and <a href="https://micropyramid.com/django-rest-framework-development-services/">MicroPyramid</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://hello.machinalis.co.uk/">Machinalis</a>, and <a href="https://rollbar.com">Rollbar</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>http://www.django-rest-framework.org//</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
@ -13,49 +13,49 @@
<url>
<loc>http://www.django-rest-framework.org//tutorial/quickstart/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//tutorial/1-serialization/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//tutorial/2-requests-and-responses/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//tutorial/3-class-based-views/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//tutorial/4-authentication-and-permissions/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//tutorial/5-relationships-and-hyperlinked-apis/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//tutorial/6-viewsets-and-routers/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//tutorial/7-schemas-and-client-libraries/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
@ -65,163 +65,163 @@
<url>
<loc>http://www.django-rest-framework.org//api-guide/requests/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/responses/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/views/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/generic-views/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/viewsets/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/routers/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/parsers/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/renderers/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/serializers/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/fields/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/relations/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/validators/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/authentication/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/permissions/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/throttling/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/filtering/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/pagination/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/versioning/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/content-negotiation/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/metadata/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/schemas/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/format-suffixes/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/reverse/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/exceptions/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/status-codes/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/testing/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//api-guide/settings/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
@ -231,145 +231,145 @@
<url>
<loc>http://www.django-rest-framework.org//topics/documenting-your-api/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/api-clients/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/internationalization/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/ajax-csrf-cors/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/html-and-forms/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/browser-enhancements/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/browsable-api/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/rest-hypermedia-hateoas/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/third-party-packages/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/tutorials-and-resources/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/contributing/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/project-management/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/jobs/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/3.0-announcement/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/3.1-announcement/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/3.2-announcement/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/3.3-announcement/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/3.4-announcement/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/3.5-announcement/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/3.6-announcement/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/kickstarter-announcement/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/mozilla-grant/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/funding/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>http://www.django-rest-framework.org//topics/release-notes/</loc>
<lastmod>2017-05-12</lastmod>
<lastmod>2017-08-22</lastmod>
<changefreq>daily</changefreq>
</url>

View File

@ -466,7 +466,7 @@
<hr />
<p><em>Below is an in-depth guide to the API changes and migration notes for 3.0.</em></p>
<h2 id="request-objects"><a class="toclink" href="#request-objects">Request objects</a></h2>
<h4 id="the-data-and-query_params-properties"><a class="toclink" href="#the-data-and-query_params-properties">The <code>.data</code> and <code>.query_params</code> properties.</a></h4>
<h4 id="the-data-and-query_params-properties"><code>.query_params</code> properties.<a class="toclink" href="#the-data-and-query_params-properties">The <code>.data</code> and </a></h4>
<p>The usage of <code>request.DATA</code> and <code>request.FILES</code> is now pending deprecation in favor of a single <code>request.data</code> attribute that contains <em>all</em> the parsed data.</p>
<p>Having separate attributes is reasonable for web applications that only ever parse url-encoded or multipart requests, but makes less sense for the general-purpose request parsing that REST framework supports.</p>
<p>You may now pass all the request data to a serializer class in a single argument:</p>
@ -498,7 +498,7 @@ ExampleSerializer(data=request.DATA, files=request.FILES)
<li>Calling <code>serializer.save()</code> then saves and returns the new object instance.</li>
</ol>
<p>The resulting API changes are further detailed below.</p>
<h4 id="the-create-and-update-methods"><a class="toclink" href="#the-create-and-update-methods">The <code>.create()</code> and <code>.update()</code> methods.</a></h4>
<h4 id="the-create-and-update-methods"><code>.update()</code> methods.<a class="toclink" href="#the-create-and-update-methods">The <code>.create()</code> and </a></h4>
<p>The <code>.restore_object()</code> method is now removed, and we instead have two separate methods, <code>.create()</code> and <code>.update()</code>. These methods work slightly different to the previous <code>.restore_object()</code>.</p>
<p>When using the <code>.create()</code> and <code>.update()</code> methods you should both create <em>and save</em> the object instance. This is in contrast to the previous <code>.restore_object()</code> behavior that would instantiate the object but not save it.</p>
<p>These methods also replace the optional <code>.save_object()</code> method, which no longer exists.</p>
@ -530,7 +530,7 @@ def create(self, validated_data):
return Snippet.objects.create(**validated_data)
</code></pre>
<p>Note that these methods should return the newly created object instance.</p>
<h4 id="use-validated_data-instead-of-object"><a class="toclink" href="#use-validated_data-instead-of-object">Use <code>.validated_data</code> instead of <code>.object</code>.</a></h4>
<h4 id="use-validated_data-instead-of-object"><code>.object</code>.<a class="toclink" href="#use-validated_data-instead-of-object">Use <code>.validated_data</code> instead of </a></h4>
<p>You must now use the <code>.validated_data</code> attribute if you need to inspect the data before saving, rather than using the <code>.object</code> attribute, which no longer exists.</p>
<p>For example the following code <em>is no longer valid</em>:</p>
<pre><code>if serializer.is_valid():
@ -878,7 +878,7 @@ def all_high_scores(request):
</code></pre>
<hr />
<h2 id="serializer-fields"><a class="toclink" href="#serializer-fields">Serializer fields</a></h2>
<h4 id="the-field-and-readonly-field-classes"><a class="toclink" href="#the-field-and-readonly-field-classes">The <code>Field</code> and <code>ReadOnly</code> field classes.</a></h4>
<h4 id="the-field-and-readonly-field-classes"><code>ReadOnly</code> field classes.<a class="toclink" href="#the-field-and-readonly-field-classes">The <code>Field</code> and </a></h4>
<p>There are some minor tweaks to the field base classes.</p>
<p>Previously we had these two base classes:</p>
<ul>
@ -890,7 +890,7 @@ def all_high_scores(request):
<li><code>Field</code> is the base class for all fields. It does not include any default implementation for either serializing or deserializing data.</li>
<li><code>ReadOnlyField</code> is a concrete implementation for read-only fields that simply returns the attribute value without modification.</li>
</ul>
<h4 id="the-required-allow_null-allow_blank-and-default-arguments"><a class="toclink" href="#the-required-allow_null-allow_blank-and-default-arguments">The <code>required</code>, <code>allow_null</code>, <code>allow_blank</code> and <code>default</code> arguments.</a></h4>
<h4 id="the-required-allow_null-allow_blank-and-default-arguments"><code>allow_null</code>, <code>default</code> arguments.<a class="toclink" href="#the-required-allow_null-allow_blank-and-default-arguments">The <code>required</code>, <code>allow_blank</code> and </a></h4>
<p>REST framework now has more explicit and clear control over validating empty values for fields.</p>
<p>Previously the meaning of the <code>required=False</code> keyword argument was underspecified. In practice its use meant that a field could either be not included in the input, or it could be included, but be <code>None</code> or the empty string.</p>
<p>We now have a better separation, with separate <code>required</code>, <code>allow_null</code> and <code>allow_blank</code> arguments.</p>
@ -1000,7 +1000,7 @@ This removes some magic and makes it easier and more obvious to move between imp
<p>The following usage will <em>now raise an error</em>:</p>
<pre><code>email = serializers.EmailField(source='email')
</code></pre>
<h4 id="the-uniquevalidator-and-uniquetogethervalidator-classes"><a class="toclink" href="#the-uniquevalidator-and-uniquetogethervalidator-classes">The <code>UniqueValidator</code> and <code>UniqueTogetherValidator</code> classes.</a></h4>
<h4 id="the-uniquevalidator-and-uniquetogethervalidator-classes"><code>UniqueTogetherValidator</code> classes.<a class="toclink" href="#the-uniquevalidator-and-uniquetogethervalidator-classes">The <code>UniqueValidator</code> and </a></h4>
<p>REST framework now provides new validators that allow you to ensure field uniqueness, while still using a completely explicit <code>Serializer</code> class instead of using <code>ModelSerializer</code>.</p>
<p>The <code>UniqueValidator</code> should be applied to a serializer field, and takes a single <code>queryset</code> argument.</p>
<pre><code>from rest_framework import serializers

View File

@ -498,17 +498,17 @@ documentation generation and parameter annotation.</p>
<tr>
<td><a href="http://www.coreapi.org/specification/encoding/#core-json-encoding">Core JSON</a></td>
<td>Schema generation &amp; client support.</td>
<td>Built-in support in <code>coreapi</code>.</td>
<td>Built-in support in <code>coreapi</code></td>
</tr>
<tr>
<td><a href="https://openapis.org/specification">Swagger / OpenAPI</a></td>
<td>Schema generation &amp; client support.</td>
<td>The <code>openapi-codec</code> package.</td>
<td>The <code>openapi-codec</code>package.</td>
</tr>
<tr>
<td><a href="http://json-schema.org/latest/json-schema-hypermedia.html">JSON Hyper-Schema</a></td>
<td>Currently client support only.</td>
<td>The <code>hyperschema-codec</code> package.</td>
<td>The <code>hyperschema-codec</code>package.</td>
</tr>
<tr>
<td><a href="https://apiblueprint.org/">API Blueprint</a></td>

View File

@ -790,7 +790,7 @@ const schema = window.schema
</code></pre>
<h2 id="instantiating-a-client"><a class="toclink" href="#instantiating-a-client">Instantiating a client</a></h2>
<p>In order to interact with the API you'll need a client instance.</p>
<pre><code>var client = coreapi.Client()
<pre><code>var client = new coreapi.Client()
</code></pre>
<p>Typically you'll also want to provide some authentication credentials when
instantiating the client.</p>
@ -802,7 +802,7 @@ the user to login, and then instantiate a client using session authentication:</
csrfCookieName: 'csrftoken',
csrfHeaderName: 'X-CSRFToken'
})
let client = coreapi.Client({auth: auth})
let client = new coreapi.Client({auth: auth})
</code></pre>
<p>The authentication scheme will handle including a CSRF header in any outgoing
requests for unsafe HTTP methods.</p>
@ -813,7 +813,7 @@ requests for unsafe HTTP methods.</p>
scheme: 'JWT'
token: '&lt;token&gt;'
})
let client = coreapi.Client({auth: auth})
let client = new coreapi.Client({auth: auth})
</code></pre>
<p>When using TokenAuthentication you'll probably need to implement a login flow
using the CoreAPI client.</p>
@ -821,7 +821,7 @@ using the CoreAPI client.</p>
request to an "obtain token" endpoint</p>
<p>For example, using the "Django REST framework JWT" package</p>
<pre><code>// Setup some globally accessible state
window.client = coreapi.Client()
window.client = new coreapi.Client()
window.loggedIn = false
function loginUser(username, password) {
@ -846,7 +846,7 @@ function loginUser(username, password) {
username: '&lt;username&gt;',
password: '&lt;password&gt;'
})
let client = coreapi.Client({auth: auth})
let client = new coreapi.Client({auth: auth})
</code></pre>
<h2 id="using-the-client"><a class="toclink" href="#using-the-client">Using the client</a></h2>
<p>Making requests:</p>

View File

@ -449,7 +449,7 @@ For example:</p>
<pre><code>class UserList(generics.ListAPIView):
"""
Return a list of all the existing users.
""""
"""
</code></pre>
<p>If a view supports multiple methods, you should split your documentation using <code>method:</code> style delimiters.</p>
<pre><code>class UserList(generics.ListCreateAPIView):

View File

@ -406,6 +406,10 @@
<a href="#accountability">Accountability</a>
</li>
<li>
<a href="#frequently-asked-questions">Frequently asked questions</a>
</li>
<li>
<a href="#our-sponsors">Our sponsors</a>
</li>
@ -741,7 +745,7 @@ DRF is one of the core reasons why Django is top choice among web frameworks tod
<p>For further enquires please contact <a href=mailto:funding@django-rest-framework.org>funding@django-rest-framework.org</a>.</p>
<hr />
<h2 id="accountability"><a class="toclink" href="#accountability">Accountability</a></h2>
<p>In an effort to keep the project as transparent as possible, we are releasing <a href="http://www.encode.io/reports/march-2017">monthly progress reports</a> and regularly include financial reports and cost breakdowns.</p>
<p>In an effort to keep the project as transparent as possible, we are releasing <a href="http://www.encode.io/reports/july-2017">monthly progress reports</a> and regularly include financial reports and cost breakdowns.</p>
<!-- Begin MailChimp Signup Form -->
<p><link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet" type="text/css">
@ -770,6 +774,18 @@ DRF is one of the core reasons why Django is top choice among web frameworks tod
<script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script><script type='text/javascript'>(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';fnames[2]='LNAME';ftypes[2]='text';}(jQuery));var $mcj = jQuery.noConflict(true);</script>
<!--End mc_embed_signup--></p>
<hr />
<h2 id="frequently-asked-questions"><a class="toclink" href="#frequently-asked-questions">Frequently asked questions</a></h2>
<p><strong>Q: Can you issue monthly invoices?</strong>
A: Yes, we are happy to issue monthly invoices. Please just <a href=mailto:funding@django-rest-framework.org>email us</a> and let us know who to issue the invoice to (name and address) and which email address to send it to each month.</p>
<p><strong>Q: Does sponsorship include VAT?</strong>
A: Sponsorship is VAT exempt.</p>
<p><strong>Q: Do I have to sign up for a certain time period?</strong>
A: No, we appreciate your support for any time period that is convenient for you. Also, you can cancel your sponsorship anytime.</p>
<p><strong>Q: Can I pay yearly? Can I pay upfront fox X amount of months at a time?</strong>
A: We are currently only set up to accept monthly payments. However, if you'd like to support Django REST framework and you can only do yearly/upfront payments, we are happy to work with you and figure out a convenient solution.</p>
<p><strong>Q: Are you only looking for corporate sponsors?</strong>
A: No, we value individual sponsors just as much as corporate sponsors and appreciate any kind of support.</p>
<hr />
<h2 id="our-sponsors"><a class="toclink" href="#our-sponsors">Our sponsors</a></h2>
<div id="fundingInclude"></div>

View File

@ -597,22 +597,22 @@ class ProfileDetail(APIView):
</tr>
<tr>
<td>select.html</td>
<td><code>ChoiceField</code> or relational field types</td>
<td><code>ChoiceField</code>or relational field types</td>
<td>hide_label</td>
</tr>
<tr>
<td>radio.html</td>
<td><code>ChoiceField</code> or relational field types</td>
<td><code>ChoiceField</code>or relational field types</td>
<td>inline, hide_label</td>
</tr>
<tr>
<td>select_multiple.html</td>
<td><code>MultipleChoiceField</code> or relational fields with <code>many=True</code></td>
<td><code>MultipleChoiceField</code>or relational fields with <code>many=True</code></td>
<td>hide_label</td>
</tr>
<tr>
<td>checkbox_multiple.html</td>
<td><code>MultipleChoiceField</code> or relational fields with <code>many=True</code></td>
<td><code>MultipleChoiceField</code>or relational fields with <code>many=True</code></td>
<td>inline, hide_label</td>
</tr>
<tr>
@ -627,7 +627,7 @@ class ProfileDetail(APIView):
</tr>
<tr>
<td>list_fieldset.html</td>
<td><code>ListField</code> or nested serializer with <code>many=True</code></td>
<td><code>ListField</code>or nested serializer with <code>many=True</code></td>
<td>hide_label</td>
</tr>
</tbody>

View File

@ -470,6 +470,34 @@
</code></pre>
<hr />
<h2 id="36x-series"><a class="toclink" href="#36x-series">3.6.x series</a></h2>
<h3 id="364"><a class="toclink" href="#364">3.6.4</a></h3>
<p><strong>Date</strong>: <a href="https://github.com/encode/django-rest-framework/issues?q=milestone%3A%223.6.4+Release%22">21st August 2017</a></p>
<ul>
<li>Ignore any invalidly formed query parameters for OrderingFilter. <a href="https://github.com/encode/django-rest-framework/issues/5131">#5131</a></li>
<li>Improve memory footprint when reading large JSON requests. <a href="https://github.com/encode/django-rest-framework/issues/5147">#5147</a></li>
<li>Fix schema generation for pagination. <a href="https://github.com/encode/django-rest-framework/issues/5161">#5161</a></li>
<li>Fix exception when <code>HTML_CUTOFF</code> is set to <code>None</code>. <a href="https://github.com/encode/django-rest-framework/issues/5174">#5174</a></li>
<li>Fix browsable API not supporting <code>multipart/form-data</code> correctly. <a href="https://github.com/encode/django-rest-framework/issues/5176">#5176</a></li>
<li>Fixed <code>test_hyperlinked_related_lookup_url_encoded_exists</code>. <a href="https://github.com/encode/django-rest-framework/issues/5179">#5179</a></li>
<li>Make sure max_length is in FileField kwargs. <a href="https://github.com/encode/django-rest-framework/issues/5186">#5186</a></li>
<li>Fix <code>list_route</code> &amp; <code>detail_route</code> with kwargs contains curly bracket in <code>url_path</code> <a href="https://github.com/encode/django-rest-framework/issues/5187">#5187</a></li>
<li>Add Django manage command to create a DRF user Token. <a href="https://github.com/encode/django-rest-framework/issues/5188">#5188</a></li>
<li>Ensure API documentation templates do not check for user authentication <a href="https://github.com/encode/django-rest-framework/issues/5162">#5162</a></li>
<li>Fix special case where OneToOneField is also primary key. <a href="https://github.com/encode/django-rest-framework/issues/5192">#5192</a></li>
<li>Added aria-label and a new region for accessibility purposes in base.html <a href="https://github.com/encode/django-rest-framework/issues/5196">#5196</a></li>
<li>Quote nested API parameters in api.js. <a href="https://github.com/encode/django-rest-framework/issues/5214">#5214</a></li>
<li>Set ViewSet args/kwargs/request before dispatch. <a href="https://github.com/encode/django-rest-framework/issues/5229">#5229</a></li>
<li>Added unicode support to SlugField. <a href="https://github.com/encode/django-rest-framework/issues/5231">#5231</a></li>
<li>Fix HiddenField appears in Raw Data form initial content. <a href="https://github.com/encode/django-rest-framework/issues/5259">#5259</a></li>
<li>Raise validation error on invalid timezone parsing. <a href="https://github.com/encode/django-rest-framework/issues/5261">#5261</a></li>
<li>Fix SearchFilter to-many behavior/performance. <a href="https://github.com/encode/django-rest-framework/issues/5264">#5264</a></li>
<li>Simplified chained comparisons and minor code fixes. <a href="https://github.com/encode/django-rest-framework/issues/5276">#5276</a></li>
<li>RemoteUserAuthentication, docs, and tests. <a href="https://github.com/encode/django-rest-framework/issues/5306">#5306</a></li>
<li>Revert "Cached the field's root and context property" <a href="https://github.com/encode/django-rest-framework/issues/5313">#5313</a></li>
<li>Fix introspection of list field in schema. <a href="https://github.com/encode/django-rest-framework/issues/5326">#5326</a></li>
<li>Fix interactive docs for multiple nested and extra methods. <a href="https://github.com/encode/django-rest-framework/issues/5334">#5334</a></li>
<li>Fix/remove undefined template var "schema" <a href="https://github.com/encode/django-rest-framework/issues/5346">#5346</a></li>
</ul>
<h3 id="363"><a class="toclink" href="#363">3.6.3</a></h3>
<p><strong>Date</strong>: <a href="https://github.com/encode/django-rest-framework/issues?q=milestone%3A%223.6.3+Release%22">12th May 2017</a></p>
<ul>
@ -1095,6 +1123,8 @@
<!-- 3.6.2 -->
<!-- 3.6.3 -->
<!-- 3.6.4 -->
</div> <!--/span-->

View File

@ -532,6 +532,7 @@ You probably want to also tag the version now:
<li><a href="https://github.com/evonove/django-oauth-toolkit">django-oauth-toolkit</a> - Provides OAuth 2.0 support.</li>
<li><a href="https://github.com/Rediker-Software/doac">doac</a> - Provides OAuth 2.0 support.</li>
<li><a href="https://github.com/GetBlimp/django-rest-framework-jwt">djangorestframework-jwt</a> - Provides JSON Web Token Authentication support.</li>
<li><a href="https://github.com/davesque/django-rest-framework-simplejwt">djangorestframework-simplejwt</a> - An alternative package that provides JSON Web Token Authentication support.</li>
<li><a href="https://github.com/kumar303/hawkrest">hawkrest</a> - Provides Hawk HTTP Authorization.</li>
<li><a href="https://github.com/etoccalino/django-rest-framework-httpsignature">djangorestframework-httpsignature</a> - Provides an easy to use HTTP Signature Authentication mechanism.</li>
<li><a href="https://github.com/sunscrapers/djoser">djoser</a> - Provides a set of views to handle basic actions such as registration, login, logout, password reset and account activation.</li>
@ -566,7 +567,7 @@ You probably want to also tag the version now:
<h3 id="views"><a class="toclink" href="#views">Views</a></h3>
<ul>
<li><a href="https://github.com/miki725/django-rest-framework-bulk">djangorestframework-bulk</a> - Implements generic view mixins as well as some common concrete generic views to allow to apply bulk operations via API requests.</li>
<li><a href="https://github.com/Axiologue/DjangoRestMultipleModels">django-rest-multiple-models</a> - Provides a generic view (and mixin) for sending multiple serialized models and/or querysets via a single API request.</li>
<li><a href="https://github.com/MattBroach/DjangoRestMultipleModels">django-rest-multiple-models</a> - Provides a generic view (and mixin) for sending multiple serialized models and/or querysets via a single API request.</li>
</ul>
<h3 id="routers"><a class="toclink" href="#routers">Routers</a></h3>
<ul>

View File

@ -445,6 +445,7 @@
<h2 id="videos"><a class="toclink" href="#videos">Videos</a></h2>
<h3 id="talks"><a class="toclink" href="#talks">Talks</a></h3>
<ul>
<li><a href="https://www.youtube.com/watch?v=Rk6MHZdust4">Level Up! Rethinking the Web API Framework</a></li>
<li><a href="https://www.youtube.com/watch?v=M6Ud3qC2tTk">How to Make a Full Fledged REST API with Django OAuth Toolkit</a></li>
<li><a href="https://www.youtube.com/watch?v=cqP758k1BaQ">Django REST API - So Easy You Can Learn It in 25 Minutes</a></li>
<li><a href="https://www.youtube.com/watch?v=3cSsbe-tA0E">Tom Christie about Django Rest Framework at Django: Under The Hood</a></li>

View File

@ -447,14 +447,14 @@ API schema.</p>
</code></pre>
<p>We can now include a schema for our API, by including an autogenerated schema
view in our URL configuration.</p>
<pre><code> from rest_framework.schemas import get_schema_view
<pre><code class="python">from rest_framework.schemas import get_schema_view
schema_view = get_schema_view(title='Pastebin API')
schema_view = get_schema_view(title='Pastebin API')
urlpatterns = [
   url(r'^schema/$', schema_view),
...
]
urlpatterns = [
   url(r'^schema/$', schema_view),
...
]
</code></pre>
<p>If you visit the API root endpoint in a browser you should now see <code>corejson</code>