Deployed 86931b01 with MkDocs version: 0.15.3

This commit is contained in:
Tom Christie 2017-03-09 14:59:14 +00:00
parent ec18b53c0a
commit 7f69162ec3
65 changed files with 1668 additions and 421 deletions

View File

@ -286,6 +286,10 @@
<a href="topics/project-management/">Project management</a> <a href="topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="topics/3.0-announcement/">3.0 Announcement</a> <a href="topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="topics/3.5-announcement/">3.5 Announcement</a> <a href="topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="topics/release-notes/">Release Notes</a> <a href="topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>
@ -633,6 +637,7 @@ Set to false if this field is not required to be present during deserialization.
<p>If set, this gives the default value that will be used for the field if no input value is supplied. If not set the default behaviour is to not populate the attribute at all.</p> <p>If set, this gives the default value that will be used for the field if no input value is supplied. If not set the default behaviour is to not populate the attribute at all.</p>
<p>The <code>default</code> is not applied during partial update operations. In the partial update case only fields that are provided in the incoming data will have a validated value returned.</p> <p>The <code>default</code> is not applied during partial update operations. In the partial update case only fields that are provided in the incoming data will have a validated value returned.</p>
<p>May be set to a function or other callable, in which case the value will be evaluated each time it is used. When called, it will receive no arguments. If the callable has a <code>set_context</code> method, that will be called each time before getting the value with the field instance as only argument. This works the same way as for <a href="../validators/#using-set_context">validators</a>.</p> <p>May be set to a function or other callable, in which case the value will be evaluated each time it is used. When called, it will receive no arguments. If the callable has a <code>set_context</code> method, that will be called each time before getting the value with the field instance as only argument. This works the same way as for <a href="../validators/#using-set_context">validators</a>.</p>
<p>When serializing the instance, default will be used if the the object attribute or dictionary key is not present in the instance.</p>
<p>Note that setting a <code>default</code> value implies that the field is not required. Including both the <code>default</code> and <code>required</code> keyword arguments is invalid and will raise an error.</p> <p>Note that setting a <code>default</code> value implies that the field is not required. Including both the <code>default</code> and <code>required</code> keyword arguments is invalid and will raise an error.</p>
<h3 id="source"><a class="toclink" href="#source"><code>source</code></a></h3> <h3 id="source"><a class="toclink" href="#source"><code>source</code></a></h3>
<p>The name of the attribute that will be used to populate the field. May be a method that only takes a <code>self</code> argument, such as <code>URLField(source='get_absolute_url')</code>, or may use dotted notation to traverse attributes, such as <code>EmailField(source='user.email')</code>.</p> <p>The name of the attribute that will be used to populate the field. May be a method that only takes a <code>self</code> argument, such as <code>URLField(source='get_absolute_url')</code>, or may use dotted notation to traverse attributes, such as <code>EmailField(source='user.email')</code>.</p>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>
@ -571,7 +575,7 @@ class UserList(generics.ListCreateAPIView):
<p><strong>Pagination</strong>:</p> <p><strong>Pagination</strong>:</p>
<p>The following attributes are used to control pagination when used with list views.</p> <p>The following attributes are used to control pagination when used with list views.</p>
<ul> <ul>
<li><code>pagination_class</code> - The pagination class that should be used when paginating list results. Defaults to the same value as the <code>DEFAULT_PAGINATION_CLASS</code> setting, which is <code>'rest_framework.pagination.PageNumberPagination'</code>.</li> <li><code>pagination_class</code> - The pagination class that should be used when paginating list results. Defaults to the same value as the <code>DEFAULT_PAGINATION_CLASS</code> setting, which is <code>'rest_framework.pagination.PageNumberPagination'</code>. Setting <code>pagination_class=None</code> will disable pagination on this view.</li>
</ul> </ul>
<p><strong>Filtering</strong>:</p> <p><strong>Filtering</strong>:</p>
<ul> <ul>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

BIN
img/api-docs.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 MiB

BIN
img/api-docs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

View File

@ -286,6 +286,10 @@
<a href="topics/project-management/">Project management</a> <a href="topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="topics/3.0-announcement/">3.0 Announcement</a> <a href="topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="topics/3.5-announcement/">3.5 Announcement</a> <a href="topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="topics/release-notes/">Release Notes</a> <a href="topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>
@ -550,7 +554,7 @@ continued development by <strong><a href="topics/funding/">signing up for a paid
<ul> <ul>
<li><a href="http://pypi.python.org/pypi/coreapi/">coreapi</a> (1.32.0+) - Schema generation support.</li> <li><a href="http://pypi.python.org/pypi/coreapi/">coreapi</a> (1.32.0+) - Schema generation support.</li>
<li><a href="http://pypi.python.org/pypi/Markdown/">Markdown</a> (2.1.0+) - Markdown support for the browsable API.</li> <li><a href="http://pypi.python.org/pypi/Markdown/">Markdown</a> (2.1.0+) - Markdown support for the browsable API.</li>
<li><a href="http://pypi.python.org/pypi/django-filter">django-filter</a> (0.9.2+) - Filtering support.</li> <li><a href="http://pypi.python.org/pypi/django-filter">django-filter</a> (1.0.1+) - Filtering support.</li>
<li><a href="https://github.com/maraujop/django-crispy-forms">django-crispy-forms</a> - Improved HTML display for filtering.</li> <li><a href="https://github.com/maraujop/django-crispy-forms">django-crispy-forms</a> - Improved HTML display for filtering.</li>
<li><a href="https://github.com/lukaszb/django-guardian">django-guardian</a> (1.1.1+) - Object level permissions support.</li> <li><a href="https://github.com/lukaszb/django-guardian">django-guardian</a> (1.1.1+) - Object level permissions support.</li>
</ul> </ul>
@ -704,7 +708,7 @@ Framework.</p>
<p>If you believe youve found something in Django REST framework which has security implications, please <strong>do not raise the issue in a public forum</strong>.</p> <p>If you believe youve found something in Django REST framework which has security implications, please <strong>do not raise the issue in a public forum</strong>.</p>
<p>Send a description of the issue via email to <a href="mailto:rest-framework-security@googlegroups.com">rest-framework-security@googlegroups.com</a>. The project maintainers will then work with you to resolve any issues where required, prior to any public disclosure.</p> <p>Send a description of the issue via email to <a href="mailto:rest-framework-security@googlegroups.com">rest-framework-security@googlegroups.com</a>. The project maintainers will then work with you to resolve any issues where required, prior to any public disclosure.</p>
<h2 id="license"><a class="toclink" href="#license">License</a></h2> <h2 id="license"><a class="toclink" href="#license">License</a></h2>
<p>Copyright (c) 2011-2016, Tom Christie <p>Copyright (c) 2011-2017, Tom Christie
All rights reserved.</p> All rights reserved.</p>
<p>Redistribution and use in source and binary forms, with or without <p>Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:</p> modification, are permitted provided that the following conditions are met:</p>

File diff suppressed because one or more lines are too long

View File

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

View File

@ -61,7 +61,7 @@
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3.1-announcement/"> <a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3.1-announcement/">
Next <i class="icon-arrow-right icon-white"></i> Next <i class="icon-arrow-right icon-white"></i>
</a> </a>
<a class="repo-link btn btn-inverse btn-small " rel="next" href="../project-management/"> <a class="repo-link btn btn-inverse btn-small " rel="next" href="../jobs/">
<i class="icon-arrow-left icon-white"></i> Previous <i class="icon-arrow-left icon-white"></i> Previous
</a> </a>
<a id="search_modal_show" class="repo-link btn btn-inverse btn-small" href="#mkdocs_search_modal" data-toggle="modal" data-target="#mkdocs_search_modal"><i class="icon-search icon-white"></i> Search</a> <a id="search_modal_show" class="repo-link btn btn-inverse btn-small" href="#mkdocs_search_modal" data-toggle="modal" data-target="#mkdocs_search_modal"><i class="icon-search icon-white"></i> Search</a>
@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li class="active" > <li class="active" >
<a href="./">3.0 Announcement</a> <a href="./">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -58,7 +58,7 @@
<div class="navbar-inner"> <div class="navbar-inner">
<div class="container-fluid"> <div class="container-fluid">
<a class="repo-link btn btn-primary btn-small" href="https://github.com/tomchristie/django-rest-framework/tree/master">GitHub</a> <a class="repo-link btn btn-primary btn-small" href="https://github.com/tomchristie/django-rest-framework/tree/master">GitHub</a>
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../kickstarter-announcement/"> <a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3.6-announcement/">
Next <i class="icon-arrow-right icon-white"></i> Next <i class="icon-arrow-right icon-white"></i>
</a> </a>
<a class="repo-link btn btn-inverse btn-small " rel="next" href="../3.4-announcement/"> <a class="repo-link btn btn-inverse btn-small " rel="next" href="../3.4-announcement/">
@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="./">3.5 Announcement</a> <a href="./">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -0,0 +1,627 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>3.6 Announcement - Django REST framework</title>
<link href="../../img/favicon.ico" rel="icon" type="image/x-icon">
<link rel="canonical" href="http://www.django-rest-framework.org/topics/3.6-announcement/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Django, API, REST, 3.6 Announcement">
<meta name="author" content="Tom Christie">
<!-- Le styles -->
<link href="../../css/prettify.css" rel="stylesheet">
<link href="../../css/bootstrap.css" rel="stylesheet">
<link href="../../css/bootstrap-responsive.css" rel="stylesheet">
<link href="../../css/default.css" rel="stylesheet">
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-18852272-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
<style>
#sidebarInclude img {
margin-bottom: 10px;
}
#sidebarInclude a.promo {
color: black;
}
@media (max-width: 767px) {
div.promo {
display: none;
}
}
</style>
</head>
<body onload="prettyPrint()" class="-page">
<div class="wrapper">
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="repo-link btn btn-primary btn-small" href="https://github.com/tomchristie/django-rest-framework/tree/master">GitHub</a>
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../kickstarter-announcement/">
Next <i class="icon-arrow-right icon-white"></i>
</a>
<a class="repo-link btn btn-inverse btn-small " rel="next" href="../3.5-announcement/">
<i class="icon-arrow-left icon-white"></i> Previous
</a>
<a id="search_modal_show" class="repo-link btn btn-inverse btn-small" href="#mkdocs_search_modal" data-toggle="modal" data-target="#mkdocs_search_modal"><i class="icon-search icon-white"></i> Search</a>
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="http://www.django-rest-framework.org">Django REST framework</a>
<div class="nav-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li >
<a href="../..">Home</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Tutorial <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../../tutorial/quickstart/">Quickstart</a>
</li>
<li >
<a href="../../tutorial/1-serialization/">1 - Serialization</a>
</li>
<li >
<a href="../../tutorial/2-requests-and-responses/">2 - Requests and responses</a>
</li>
<li >
<a href="../../tutorial/3-class-based-views/">3 - Class based views</a>
</li>
<li >
<a href="../../tutorial/4-authentication-and-permissions/">4 - Authentication and permissions</a>
</li>
<li >
<a href="../../tutorial/5-relationships-and-hyperlinked-apis/">5 - Relationships and hyperlinked APIs</a>
</li>
<li >
<a href="../../tutorial/6-viewsets-and-routers/">6 - Viewsets and routers</a>
</li>
<li >
<a href="../../tutorial/7-schemas-and-client-libraries/">7 - Schemas and client libraries</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">API Guide <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../../api-guide/requests/">Requests</a>
</li>
<li >
<a href="../../api-guide/responses/">Responses</a>
</li>
<li >
<a href="../../api-guide/views/">Views</a>
</li>
<li >
<a href="../../api-guide/generic-views/">Generic views</a>
</li>
<li >
<a href="../../api-guide/viewsets/">Viewsets</a>
</li>
<li >
<a href="../../api-guide/routers/">Routers</a>
</li>
<li >
<a href="../../api-guide/parsers/">Parsers</a>
</li>
<li >
<a href="../../api-guide/renderers/">Renderers</a>
</li>
<li >
<a href="../../api-guide/serializers/">Serializers</a>
</li>
<li >
<a href="../../api-guide/fields/">Serializer fields</a>
</li>
<li >
<a href="../../api-guide/relations/">Serializer relations</a>
</li>
<li >
<a href="../../api-guide/validators/">Validators</a>
</li>
<li >
<a href="../../api-guide/authentication/">Authentication</a>
</li>
<li >
<a href="../../api-guide/permissions/">Permissions</a>
</li>
<li >
<a href="../../api-guide/throttling/">Throttling</a>
</li>
<li >
<a href="../../api-guide/filtering/">Filtering</a>
</li>
<li >
<a href="../../api-guide/pagination/">Pagination</a>
</li>
<li >
<a href="../../api-guide/versioning/">Versioning</a>
</li>
<li >
<a href="../../api-guide/content-negotiation/">Content negotiation</a>
</li>
<li >
<a href="../../api-guide/metadata/">Metadata</a>
</li>
<li >
<a href="../../api-guide/schemas/">Schemas</a>
</li>
<li >
<a href="../../api-guide/format-suffixes/">Format suffixes</a>
</li>
<li >
<a href="../../api-guide/reverse/">Returning URLs</a>
</li>
<li >
<a href="../../api-guide/exceptions/">Exceptions</a>
</li>
<li >
<a href="../../api-guide/status-codes/">Status codes</a>
</li>
<li >
<a href="../../api-guide/testing/">Testing</a>
</li>
<li >
<a href="../../api-guide/settings/">Settings</a>
</li>
</ul>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Topics <b class="caret"></b></a>
<ul class="dropdown-menu">
<li >
<a href="../documenting-your-api/">Documenting your API</a>
</li>
<li >
<a href="../api-clients/">API Clients</a>
</li>
<li >
<a href="../internationalization/">Internationalization</a>
</li>
<li >
<a href="../ajax-csrf-cors/">AJAX, CSRF & CORS</a>
</li>
<li >
<a href="../html-and-forms/">HTML & Forms</a>
</li>
<li >
<a href="../browser-enhancements/">Browser Enhancements</a>
</li>
<li >
<a href="../browsable-api/">The Browsable API</a>
</li>
<li >
<a href="../rest-hypermedia-hateoas/">REST, Hypermedia & HATEOAS</a>
</li>
<li >
<a href="../third-party-packages/">Third Party Packages</a>
</li>
<li >
<a href="../tutorials-and-resources/">Tutorials and Resources</a>
</li>
<li >
<a href="../contributing/">Contributing to REST framework</a>
</li>
<li >
<a href="../project-management/">Project management</a>
</li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li >
<a href="../3.0-announcement/">3.0 Announcement</a>
</li>
<li >
<a href="../3.1-announcement/">3.1 Announcement</a>
</li>
<li >
<a href="../3.2-announcement/">3.2 Announcement</a>
</li>
<li >
<a href="../3.3-announcement/">3.3 Announcement</a>
</li>
<li >
<a href="../3.4-announcement/">3.4 Announcement</a>
</li>
<li >
<a href="../3.5-announcement/">3.5 Announcement</a>
</li>
<li class="active" >
<a href="./">3.6 Announcement</a>
</li>
<li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li>
<li >
<a href="../mozilla-grant/">Mozilla Grant</a>
</li>
<li >
<a href="../funding/">Funding</a>
</li>
<li >
<a href="../release-notes/">Release Notes</a>
</li>
</ul>
</li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</div>
</div>
<div class="body-content">
<div class="container-fluid">
<!-- Search Modal -->
<div id="mkdocs_search_modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3 id="myModalLabel">Documentation search</h3>
</div>
<div class="modal-body">
<form role="form" autocomplete="off">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search..." id="mkdocs-search-query">
</div>
</form>
<div id="mkdocs-search-results"></div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div>
<div class="row-fluid">
<div class="span3">
<div id="table-of-contents">
<ul class="nav nav-list side-nav well sidebar-nav-fixed">
<li class="main">
<a href="#django-rest-framework-36">Django REST framework 3.6</a>
</li>
<li>
<a href="#funding">Funding</a>
</li>
<li>
<a href="#interactive-api-documentation">Interactive API documentation</a>
</li>
<li>
<a href="#javascript-client-library">JavaScript client library</a>
</li>
<li>
<a href="#authentication-classes-for-the-python-client-library">Authentication classes for the Python client library</a>
</li>
<li>
<a href="#deprecations">Deprecations</a>
</li>
<li>
<a href="#whats-next">What's next</a>
</li>
<div class="promo">
<hr/>
<div id="sidebarInclude">
</div>
</ul>
</div>
</div>
<div id="main-content" class="span9">
<style>
.promo li a {
float: left;
width: 130px;
height: 20px;
text-align: center;
margin: 10px 30px;
padding: 150px 0 0 0;
background-position: 0 50%;
background-size: 130px auto;
background-repeat: no-repeat;
font-size: 120%;
color: black;
}
.promo li {
list-style: none;
}
</style>
<h1 id="django-rest-framework-36"><a class="toclink" href="#django-rest-framework-36">Django REST framework 3.6</a></h1>
<p>The 3.6 release adds two major new features to REST framework.</p>
<ol>
<li>Built-in interactive API documentation support.</li>
<li>A new JavaScript client&nbsp;library.</li>
</ol>
<p><img alt="API Documentation" src="../../img/api-docs.gif" /></p>
<p><em>Above: The interactive API documentation.</em></p>
<hr />
<h2 id="funding"><a class="toclink" href="#funding">Funding</a></h2>
<p>The 3.6 release would not have been possible without our <a href="../mozilla-grant/">backing from Mozilla</a> to the project, and our <a href="../funding/">collaborative funding&nbsp;model</a>.</p>
<p>If you use REST framework commercially and would like to see this work continue,
we strongly encourage you to invest in its continued development by
<strong><a href="../funding/">signing up for a paid&nbsp;plan</a></strong>.</p>
<ul class="premium-promo promo">
<li><a href="http://jobs.rover.com/" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/rover_130x130.png)">Rover.com</a></li>
<li><a href="https://getsentry.com/welcome/" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/sentry130.png)">Sentry</a></li>
<li><a href="https://getstream.io/try-the-api/?utm_source=drf&utm_medium=banner&utm_campaign=drf" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/stream-130.png)">Stream</a></li>
<li><a href="https://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">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>
<hr />
<h2 id="interactive-api-documentation"><a class="toclink" href="#interactive-api-documentation">Interactive API documentation</a></h2>
<p>REST framework's new API documentation supports a number of features:</p>
<ul>
<li>Live API interaction.</li>
<li>Support for various authentication schemes.</li>
<li>Code snippets for the Python, JavaScript, and Command Line clients.</li>
</ul>
<p>The <code>coreapi</code> library is required as a dependancy for the API docs. Make sure
to install the latest version (2.3.0 or above). The <code>pygments</code> and <code>markdown</code>
libraries are optional but recommended.</p>
<p>To install the API documentation, you'll need to include it in your projects URLconf:</p>
<pre><code>from rest_framework.documentation import include_docs_urls
API_TITLE = 'API title'
API_DESCRIPTION = '...'
urlpatterns = [
...
url(r'^docs/', include_docs_urls(title=API_TITLE, description=API_DESCRIPTION))
]
</code></pre>
<p>Once installed you should see something a little like this:</p>
<p><img alt="API Documentation" src="../../img/api-docs.png" /></p>
<p>We'll likely be making further refinements to the API documentation over the
coming weeks. Keep in mind that this is a new feature, and please do give
us feedback if you run into any issues or limitations.</p>
<p>For more information on documenting your API endpoints see the <a href="../documenting-your-api/">"Documenting your API"</a> section.</p>
<hr />
<h2 id="javascript-client-library"><a class="toclink" href="#javascript-client-library">JavaScript client library</a></h2>
<p>The JavaScript client library allows you to load an API schema, and then interact
with that API at an application layer interface, rather than constructing fetch
requests explicitly.</p>
<p>Here's a brief example that demonstrates:</p>
<ul>
<li>Loading the client library and schema.</li>
<li>Instantiating an authenticated client.</li>
<li>Making an API request using the client.</li>
</ul>
<p><strong>index.html</strong></p>
<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script src="/static/rest_framework/js/coreapi-0.1.0.js"&gt;&lt;/script&gt;
&lt;script src="/docs/schema.js' %}"&gt;&lt;/script&gt;
&lt;script&gt;
const coreapi = window.coreapi
const schema = window.schema
// Instantiate a client...
let auth = coreapi.auth.TokenAuthentication({scheme: 'JWT', token: 'xxx'})
let client = coreapi.Client({auth: auth})
// Make an API request...
client.action(schema, ['projects', 'list']).then(function(result) {
alert(result)
})
&lt;/script&gt;
&lt;/head&gt;
&lt;/html&gt;
</code></pre>
<p>The JavaScript client library supports various authentication schemes, and can be
used by your project itself, or as an external client interacting with your API.</p>
<p>The client is not limited to usage with REST framework APIs, although it does
currently only support loading CoreJSON API schemas. Support for Swagger and
other API schemas is planned.</p>
<p>For more details see the <a href="../api-clients/#javascript-client-library">JavaScript client library documentation</a>.</p>
<h2 id="authentication-classes-for-the-python-client-library"><a class="toclink" href="#authentication-classes-for-the-python-client-library">Authentication classes for the Python client library</a></h2>
<p>Previous authentication support in the Python client library was limited to
allowing users to provide explicit header values.</p>
<p>We now have better support for handling the details of authentication, with
the introduction of the <code>BasicAuthentication</code>, <code>TokenAuthentication</code>, and
<code>SessionAuthentication</code> schemes.</p>
<p>You can include the authentication scheme when instantiating a new client.</p>
<pre><code>auth = coreapi.auth.TokenAuthentication(scheme='JWT', token='xxx-xxx-xxx')
client = coreapi.Client(auth=auth)
</code></pre>
<p>For more information see the <a href="../api-clients/#python-client-library">Python client library documentation</a>.</p>
<hr />
<h2 id="deprecations"><a class="toclink" href="#deprecations">Deprecations</a></h2>
<h3 id="updating-coreapi"><a class="toclink" href="#updating-coreapi">Updating <code>coreapi</code></a></h3>
<p>If you're using REST framework's schema generation, or want to use the API docs,
then you'll need to update to the latest version of coreapi. (2.3.0)</p>
<h3 id="generating-schemas-from-router"><a class="toclink" href="#generating-schemas-from-router">Generating schemas from Router</a></h3>
<p>The 3.5 "pending deprecation" of router arguments for generating a schema view, such as <code>schema_title</code>, <code>schema_url</code> and <code>schema_renderers</code>, have now been escalated to a
"deprecated" warning.</p>
<p>Instead of using <code>DefaultRouter(schema_title='Example API')</code>, you should use the <code>get_schema_view()</code> function, and include the view explicitly in your URL conf.</p>
<h3 id="djangofilterbackend"><a class="toclink" href="#djangofilterbackend">DjangoFilterBackend</a></h3>
<p>The 3.5 "pending deprecation" warning of the built-in <code>DjangoFilterBackend</code> has now
been escalated to a "deprecated" warning.</p>
<p>You should change your imports and REST framework filter settings as follows:</p>
<ul>
<li><code>rest_framework.filters.DjangoFilterBackend</code> becomes <code>django_filters.rest_framework.DjangoFilterBackend</code>.</li>
<li><code>rest_framework.filters.FilterSet</code> becomes <code>django_filters.rest_framework.FilterSet</code>.</li>
</ul>
<hr />
<h2 id="whats-next"><a class="toclink" href="#whats-next">What's next</a></h2>
<p>There are likely to be a number of refinements to the API documentation and
JavaScript client library over the coming weeks, which could include some of the following:</p>
<ul>
<li>Support for private API docs, requiring login.</li>
<li>File upload and download support in the JavaScript client &amp; API docs.</li>
<li>Comprehensive documentation for the JavaScript client library.</li>
<li>Automatically including authentication details in the API doc code snippets.</li>
<li>Adding authentication support in the command line client.</li>
<li>Support for loading Swagger and other schemas in the JavaScript client.</li>
<li>Improved support for documenting parameter schemas and response schemas.</li>
<li>Refining the API documentation interaction modal.</li>
</ul>
<p>Once work on those refinements is complete, we'll be starting feature work
on realtime support, for the 3.7 release.</p>
</div> <!--/span-->
</div> <!--/row-->
</div> <!--/.fluid-container-->
</div> <!--/.body content-->
<div id="push"></div>
</div> <!--/.wrapper -->
<footer class="span12">
<p>Documentation built with <a href="http://www.mkdocs.org/">MkDocs</a>.
</p>
</footer>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../../js/jquery-1.8.1-min.js"></script>
<script src="../../js/prettify-1.0.js"></script>
<script src="../../js/bootstrap-2.1.1-min.js"></script>
<script src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
<script>var base_url = '../..';</script>
<script src="../../mkdocs/js/require.js"></script>
<script src="../../js/theme.js"></script>
<script>
var shiftWindow = function() {
scrollBy(0, -50)
};
if (location.hash) shiftWindow();
window.addEventListener("hashchange", shiftWindow);
$('.dropdown-menu').on('click touchstart', function(event) {
event.stopPropagation();
});
// Dynamically force sidenav/dropdown to no higher than browser window
$('.side-nav, .dropdown-menu').css('max-height', window.innerHeight - 130);
$(function() {
$(window).resize(function() {
$('.side-nav, .dropdown-menu').css('max-height', window.innerHeight - 130);
});
});
</script>
</body>
</html>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>
@ -418,6 +422,14 @@
<a href="#getting-started_1">Getting started</a> <a href="#getting-started_1">Getting started</a>
</li> </li>
<li>
<a href="#authentication">Authentication</a>
</li>
<li>
<a href="#interacting-with-the-api">Interacting with the API</a>
</li>
<li> <li>
<a href="#codecs_1">Codecs</a> <a href="#codecs_1">Codecs</a>
</li> </li>
@ -427,6 +439,28 @@
</li> </li>
<li class="main">
<a href="#javascript-client-library">JavaScript Client Library</a>
</li>
<li>
<a href="#installing-the-javascript-client">Installing the JavaScript client</a>
</li>
<li>
<a href="#instantiating-a-client">Instantiating a client</a>
</li>
<li>
<a href="#using-the-client">Using the client</a>
</li>
<li>
<a href="#installation-with-node">Installation with node</a>
</li>
<div class="promo"> <div class="promo">
<hr/> <hr/>
@ -628,8 +662,48 @@ client = coreapi.Client()
<pre><code>schema = client.get('https://api.example.org/') <pre><code>schema = client.get('https://api.example.org/')
</code></pre> </code></pre>
<p>The object returned from this call will be a <code>Document</code> instance, which is <p>The object returned from this call will be a <code>Document</code> instance, which is
the internal representation of the interface that we are interacting with.</p> a representation of the API schema.</p>
<p>Now that we have our schema <code>Document</code>, we can now start to interact with the API:</p> <h2 id="authentication"><a class="toclink" href="#authentication">Authentication</a></h2>
<p>Typically you'll also want to provide some authentication credentials when
instantiating the client.</p>
<h4 id="token-authentication"><a class="toclink" href="#token-authentication">Token authentication</a></h4>
<p>The <code>TokenAuthentication</code> class can be used to support REST framework's built-in
<code>TokenAuthentication</code>, as well as OAuth and JWT schemes.</p>
<pre><code>auth = coreapi.auth.TokenAuthentication(
scheme='JWT'
token='&lt;token&gt;'
)
client = coreapi.Client(auth=auth)
</code></pre>
<p>When using TokenAuthentication you'll probably need to implement a login flow
using the CoreAPI client.</p>
<p>A suggested pattern for this would be to initially make an unauthenticated client
request to an "obtain token" endpoint</p>
<p>For example, using the "Django REST framework JWT" package</p>
<pre><code>client = coreapi.Client()
schema = client.get('https://api.example.org/')
action = ['api-token-auth', 'obtain-token']
params = {username: "example", email: "example@example.com"}
result = client.action(schema, action, params)
auth = coreapi.auth.TokenAuthentication(
scheme='JWT',
token=result['token']
)
client = coreapi.Client(auth=auth)
</code></pre>
<h4 id="basic-authentication"><a class="toclink" href="#basic-authentication">Basic authentication</a></h4>
<p>The <code>BasicAuthentication</code> class can be used to support HTTP Basic Authentication.</p>
<pre><code>auth = coreapi.auth.BasicAuthentication(
username='&lt;username&gt;',
password='&lt;password&gt;'
)
client = coreapi.Client(auth=auth)
</code></pre>
<h2 id="interacting-with-the-api"><a class="toclink" href="#interacting-with-the-api">Interacting with the API</a></h2>
<p>Now that we have a client and have fetched our schema <code>Document</code>, we can now
start to interact with the API:</p>
<pre><code>users = client.action(schema, ['users', 'list']) <pre><code>users = client.action(schema, ['users', 'list'])
</code></pre> </code></pre>
<p>Some endpoints may include named parameters, which might be either optional or required:</p> <p>Some endpoints may include named parameters, which might be either optional or required:</p>
@ -674,7 +748,7 @@ support.</p>
<p>Currently the <code>coreapi</code> library only includes an HTTP/HTTPS transport, but <p>Currently the <code>coreapi</code> library only includes an HTTP/HTTPS transport, but
other protocols can also be supported.</p> other protocols can also be supported.</p>
<h4 id="configuring-transports"><a class="toclink" href="#configuring-transports">Configuring transports</a></h4> <h4 id="configuring-transports"><a class="toclink" href="#configuring-transports">Configuring transports</a></h4>
<p>The behaviour of the network layer can be customized by configuring the <p>The behavior of the network layer can be customized by configuring the
transports that the client is instantiated with.</p> transports that the client is instantiated with.</p>
<pre><code>import requests <pre><code>import requests
from coreapi import transports, Client from coreapi import transports, Client
@ -686,6 +760,130 @@ client = Client(transports=transports)
<p>More complex customizations can also be achieved, for example modifying the <p>More complex customizations can also be achieved, for example modifying the
underlying <code>requests.Session</code> instance to <a href="http://docs.python-requests.org/en/master/user/advanced/#transport-adapters">attach transport adaptors</a> underlying <code>requests.Session</code> instance to <a href="http://docs.python-requests.org/en/master/user/advanced/#transport-adapters">attach transport adaptors</a>
that modify the outgoing requests.</p> that modify the outgoing requests.</p>
<hr />
<h1 id="javascript-client-library"><a class="toclink" href="#javascript-client-library">JavaScript Client Library</a></h1>
<p>The JavaScript client library allows you to interact with your API either from a browser, or using node.</p>
<h2 id="installing-the-javascript-client"><a class="toclink" href="#installing-the-javascript-client">Installing the JavaScript client</a></h2>
<p>There are two separate JavaScript resources that you need to include in your HTML pages in order to use the JavaScript client library. These are a static <code>coreapi.js</code> file, which contains the code for the dynamic client library, and a templated <code>schema.js</code> resource, which exposes your API schema.</p>
<p>First, install the API documentation views. These will include the schema resource that'll allow you to load the schema directly from an HTML page, without having to make an asynchronous AJAX call.</p>
<pre><code>from rest_framework.documentation import include_docs_urls
urlpatterns = [
...
url(r'^docs/', include_docs_urls(title='My API service'))
]
</code></pre>
<p>Once the API documentation URLs are installed, you'll be able to include both the required JavaScript resources. Note that the ordering of these two lines is important, as the schema loading requires CoreAPI to already be installed.</p>
<pre><code>&lt;!--
Load the CoreAPI library and the API schema.
/static/rest_framework/js/coreapi-0.1.0.js
/docs/schema.js
--&gt;
{% load staticfiles %}
&lt;script src="{% static 'rest_framework/js/coreapi-0.1.0.js' %}"&gt;&lt;/script&gt;
&lt;script src="{% url 'api-docs:schema-js' %}"&gt;&lt;/script&gt;
</code></pre>
<p>The <code>coreapi</code> library, and the <code>schema</code> object will now both be available on the <code>window</code> instance.</p>
<pre><code>const coreapi = window.coreapi
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()
</code></pre>
<p>Typically you'll also want to provide some authentication credentials when
instantiating the client.</p>
<h4 id="session-authentication"><a class="toclink" href="#session-authentication">Session authentication</a></h4>
<p>The <code>SessionAuthentication</code> class allows session cookies to provide the user
authentication. You'll want to provide a standard HTML login flow, to allow
the user to login, and then instantiate a client using session authentication:</p>
<pre><code>let auth = coreapi.auth.SessionAuthentication({
csrfCookieName: 'csrftoken',
csrfHeaderName: 'X-CSRFToken'
})
let client = 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>
<h4 id="token-authentication_1"><a class="toclink" href="#token-authentication_1">Token authentication</a></h4>
<p>The <code>TokenAuthentication</code> class can be used to support REST framework's built-in
<code>TokenAuthentication</code>, as well as OAuth and JWT schemes.</p>
<pre><code>let auth = coreapi.auth.TokenAuthentication({
scheme: 'JWT'
token: '&lt;token&gt;'
})
let client = coreapi.Client({auth: auth})
</code></pre>
<p>When using TokenAuthentication you'll probably need to implement a login flow
using the CoreAPI client.</p>
<p>A suggested pattern for this would be to initially make an unauthenticated client
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.loggedIn = false
function loginUser(username, password) {
let action = ["api-token-auth", "obtain-token"]
let params = {username: "example", email: "example@example.com"}
client.action(schema, action, params).then(function(result) {
// On success, instantiate an authenticated client.
let auth = window.coreapi.auth.TokenAuthentication({
scheme: 'JWT',
token: result['token']
})
window.client = coreapi.Client({auth: auth})
window.loggedIn = true
}).catch(function (error) {
// Handle error case where eg. user provides incorrect credentials.
})
}
</code></pre>
<h4 id="basic-authentication_1"><a class="toclink" href="#basic-authentication_1">Basic authentication</a></h4>
<p>The <code>BasicAuthentication</code> class can be used to support HTTP Basic Authentication.</p>
<pre><code>let auth = coreapi.auth.BasicAuthentication({
username: '&lt;username&gt;',
password: '&lt;password&gt;'
})
let client = 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>
<pre><code>let action = ["users", "list"]
client.action(schema, action).then(function(result) {
// Return value is in 'result'
})
</code></pre>
<p>Including parameters:</p>
<pre><code>let action = ["users", "create"]
let params = {username: "example", email: "example@example.com"}
client.action(schema, action, params).then(function(result) {
// Return value is in 'result'
})
</code></pre>
<p>Handling errors:</p>
<pre><code>client.action(schema, action, params).then(function(result) {
// Return value is in 'result'
}).catch(function (error) {
// Error value is in 'error'
})
</code></pre>
<h2 id="installation-with-node"><a class="toclink" href="#installation-with-node">Installation with node</a></h2>
<p>The coreapi package is available on NPM.</p>
<pre><code>$ npm install coreapi
$ node
const coreapi = require('coreapi')
</code></pre>
<p>You'll either want to include the API schema in your codebase directly, by copying it from the <code>schema.js</code> resource, or else load the schema asynchronously. For example:</p>
<pre><code>let client = new coreapi.Client()
let schema = null
client.get("https://api.example.org/").then(function(data) {
// Load a CoreJSON API schema.
schema = data
console.log('schema loaded')
})
</code></pre>
</div> <!--/span--> </div> <!--/span-->

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>
@ -379,7 +383,11 @@
<li> <li>
<a href="#endpoint-documentation">Endpoint documentation</a> <a href="#built-in-api-documentation">Built-in API documentation</a>
</li>
<li>
<a href="#third-party-packages">Third party packages</a>
</li> </li>
<li> <li>
@ -410,10 +418,65 @@
<p>A REST API should spend almost all of its descriptive effort in defining the media type(s) used for representing resources and driving application state.</p> <p>A REST API should spend almost all of its descriptive effort in defining the media type(s) used for representing resources and driving application state.</p>
<p>&mdash; Roy Fielding, <a href="http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven">REST APIs must be hypertext driven</a></p> <p>&mdash; Roy Fielding, <a href="http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven">REST APIs must be hypertext driven</a></p>
</blockquote> </blockquote>
<p>There are a variety of approaches to API documentation. This document introduces a few of the various tools and options you might choose from. The approaches should not be considered exclusive - you may want to provide more than one documentation style for you API, such as a self describing API that also includes static documentation of the various API endpoints.</p> <p>REST framework provides built-in support for API documentation. There are also a number of great third-party documentation tools available.</p>
<h2 id="endpoint-documentation"><a class="toclink" href="#endpoint-documentation">Endpoint documentation</a></h2> <h2 id="built-in-api-documentation"><a class="toclink" href="#built-in-api-documentation">Built-in API documentation</a></h2>
<p>The most common way to document Web APIs today is to produce documentation that lists the API endpoints verbatim, and describes the allowable operations on each. There are various tools that allow you to do this in an automated or semi-automated way.</p> <p>The built-in API documentation includes:</p>
<ul>
<li>Documentation of API endpoints.</li>
<li>Automatically generated code samples for each of the available API client libraries.</li>
<li>Support for API interaction.</li>
</ul>
<h3 id="installation"><a class="toclink" href="#installation">Installation</a></h3>
<p>The <code>coreapi</code> library is required as a dependancy for the API docs. Make sure
to install the latest version. The <code>pygments</code> and <code>markdown</code> libraries
are optional but recommended.</p>
<p>To install the API documentation, you'll need to include it in your projects URLconf:</p>
<pre><code>from rest_framework.documentation import include_docs_urls
urlpatterns = [
...
url(r'^docs/', include_docs_urls(title='My API title'))
]
</code></pre>
<p>This will include two different views:</p>
<ul>
<li><code>/docs/</code> - The documentation page itself.</li>
<li><code>/docs/schema.js</code> - A JavaScript resource that exposes the API schema.</li>
</ul>
<h3 id="documenting-your-views"><a class="toclink" href="#documenting-your-views">Documenting your views</a></h3>
<p>You can document your views by including docstrings that describe each of the available actions.
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):
"""
get:
Return a list of all the existing users.
post:
Create a new user instance.
"""
</code></pre>
<p>When using viewsets, you should use the relevant action names as delimiters.</p>
<pre><code>class UserViewSet(viewsets.ModelViewSet):
"""
retrieve:
Return the given user.
list:
Return a list of all the existing users.
create:
Create a new user instance.
"""
</code></pre>
<hr /> <hr />
<h2 id="third-party-packages"><a class="toclink" href="#third-party-packages">Third party packages</a></h2>
<p>There are a number of mature third-party packages for providing API documentation.</p>
<h4 id="drf-docs"><a class="toclink" href="#drf-docs">DRF Docs</a></h4> <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="http://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> <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="http://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>
<p>Features include customizing the template with your branding, settings for hiding the docs depending on the environment and more.</p> <p>Features include customizing the template with your branding, settings for hiding the docs depending on the environment and more.</p>
@ -474,7 +537,7 @@
[ref]: http://example.com/activating-accounts [ref]: http://example.com/activating-accounts
""" """
</code></pre> </code></pre>
<p>Note that when using viewsets the basic docstring is used for all generated views. To provide descriptions for each view, such as for the the list and retrieve views, use docstring sections as described in <a href="../api-guide/schemas/#examples">Schemas as documentation: Examples</a>.</p> <p>Note that when using viewsets the basic docstring is used for all generated views. To provide descriptions for each view, such as for the the list and retrieve views, use docstring sections as described in <a href="../../api-guide/schemas/#examples">Schemas as documentation: Examples</a>.</p>
<h4 id="the-options-method"><a class="toclink" href="#the-options-method">The <code>OPTIONS</code> method</a></h4> <h4 id="the-options-method"><a class="toclink" href="#the-options-method">The <code>OPTIONS</code> method</a></h4>
<p>REST framework APIs also support programmatically accessible descriptions, using the <code>OPTIONS</code> HTTP method. A view will respond to an <code>OPTIONS</code> request with metadata including the name, description, and the various media types it accepts and responds with.</p> <p>REST framework APIs also support programmatically accessible descriptions, using the <code>OPTIONS</code> HTTP method. A view will respond to an <code>OPTIONS</code> request with metadata including the name, description, and the various media types it accepts and responds with.</p>
<p>When using the generic views, any <code>OPTIONS</code> requests will additionally respond with metadata regarding any <code>POST</code> or <code>PUT</code> actions available, describing which fields are on the serializer.</p> <p>When using the generic views, any <code>OPTIONS</code> requests will additionally respond with metadata regarding any <code>POST</code> or <code>PUT</code> actions available, describing which fields are on the serializer.</p>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -58,10 +58,10 @@
<div class="navbar-inner"> <div class="navbar-inner">
<div class="container-fluid"> <div class="container-fluid">
<a class="repo-link btn btn-primary btn-small" href="https://github.com/tomchristie/django-rest-framework/tree/master">GitHub</a> <a class="repo-link btn btn-primary btn-small" href="https://github.com/tomchristie/django-rest-framework/tree/master">GitHub</a>
<a class="repo-link btn btn-inverse btn-small disabled" rel="prev" > <a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3.0-announcement/">
Next <i class="icon-arrow-right icon-white"></i> Next <i class="icon-arrow-right icon-white"></i>
</a> </a>
<a class="repo-link btn btn-inverse btn-small " rel="next" href="../release-notes/"> <a class="repo-link btn btn-inverse btn-small " rel="next" href="../project-management/">
<i class="icon-arrow-left icon-white"></i> Previous <i class="icon-arrow-left icon-white"></i> Previous
</a> </a>
<a id="search_modal_show" class="repo-link btn btn-inverse btn-small" href="#mkdocs_search_modal" data-toggle="modal" data-target="#mkdocs_search_modal"><i class="icon-search icon-white"></i> Search</a> <a id="search_modal_show" class="repo-link btn btn-inverse btn-small" href="#mkdocs_search_modal" data-toggle="modal" data-target="#mkdocs_search_modal"><i class="icon-search icon-white"></i> Search</a>
@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li class="active" >
<a href="./">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li class="active" >
<a href="./">Jobs</a>
</li>
</ul> </ul>
</li> </li>
@ -379,7 +383,7 @@
<li> <li>
<a href="#places-to-look-for-django-rest-framework-jobs">Places to Look for Django REST Framework Jobs</a> <a href="#places-to-look-for-django-rest-framework-jobs">Places to look for Django REST Framework Jobs</a>
</li> </li>
@ -399,7 +403,7 @@
<h1 id="jobs"><a class="toclink" href="#jobs">Jobs</a></h1> <h1 id="jobs"><a class="toclink" href="#jobs">Jobs</a></h1>
<p>Looking for a new Django REST Framework related role? On this site we provide a list of job resources that may be helpful. It's also worth checking out if any of <a href="https://fund.django-rest-framework.org/topics/funding/">our sponsors are hiring</a>.</p> <p>Looking for a new Django REST Framework related role? On this site we provide a list of job resources that may be helpful. It's also worth checking out if any of <a href="https://fund.django-rest-framework.org/topics/funding/">our sponsors are hiring</a>.</p>
<h2 id="places-to-look-for-django-rest-framework-jobs"><a class="toclink" href="#places-to-look-for-django-rest-framework-jobs">Places to Look for Django REST Framework Jobs</a></h2> <h2 id="places-to-look-for-django-rest-framework-jobs"><a class="toclink" href="#places-to-look-for-django-rest-framework-jobs">Places to look for Django REST Framework Jobs</a></h2>
<ul> <ul>
<li><a href="https://www.djangoproject.com/community/jobs/">https://www.djangoproject.com/community/jobs/</a></li> <li><a href="https://www.djangoproject.com/community/jobs/">https://www.djangoproject.com/community/jobs/</a></li>
<li><a href="https://www.python.org/jobs/">https://www.python.org/jobs/</a></li> <li><a href="https://www.python.org/jobs/">https://www.python.org/jobs/</a></li>

View File

@ -61,7 +61,7 @@
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../mozilla-grant/"> <a class="repo-link btn btn-inverse btn-small " rel="prev" href="../mozilla-grant/">
Next <i class="icon-arrow-right icon-white"></i> Next <i class="icon-arrow-right icon-white"></i>
</a> </a>
<a class="repo-link btn btn-inverse btn-small " rel="next" href="../3.5-announcement/"> <a class="repo-link btn btn-inverse btn-small " rel="next" href="../3.6-announcement/">
<i class="icon-arrow-left icon-white"></i> Previous <i class="icon-arrow-left icon-white"></i> Previous
</a> </a>
<a id="search_modal_show" class="repo-link btn btn-inverse btn-small" href="#mkdocs_search_modal" data-toggle="modal" data-target="#mkdocs_search_modal"><i class="icon-search icon-white"></i> Search</a> <a id="search_modal_show" class="repo-link btn btn-inverse btn-small" href="#mkdocs_search_modal" data-toggle="modal" data-target="#mkdocs_search_modal"><i class="icon-search icon-white"></i> Search</a>
@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li class="active" > <li class="active" >
<a href="./">Kickstarter Announcement</a> <a href="./">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -58,7 +58,7 @@
<div class="navbar-inner"> <div class="navbar-inner">
<div class="container-fluid"> <div class="container-fluid">
<a class="repo-link btn btn-primary btn-small" href="https://github.com/tomchristie/django-rest-framework/tree/master">GitHub</a> <a class="repo-link btn btn-primary btn-small" href="https://github.com/tomchristie/django-rest-framework/tree/master">GitHub</a>
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3.0-announcement/"> <a class="repo-link btn btn-inverse btn-small " rel="prev" href="../jobs/">
Next <i class="icon-arrow-right icon-white"></i> Next <i class="icon-arrow-right icon-white"></i>
</a> </a>
<a class="repo-link btn btn-inverse btn-small " rel="next" href="../contributing/"> <a class="repo-link btn btn-inverse btn-small " rel="next" href="../contributing/">
@ -286,6 +286,10 @@
<a href="./">Project management</a> <a href="./">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -58,7 +58,7 @@
<div class="navbar-inner"> <div class="navbar-inner">
<div class="container-fluid"> <div class="container-fluid">
<a class="repo-link btn btn-primary btn-small" href="https://github.com/tomchristie/django-rest-framework/tree/master">GitHub</a> <a class="repo-link btn btn-primary btn-small" href="https://github.com/tomchristie/django-rest-framework/tree/master">GitHub</a>
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../jobs/"> <a class="repo-link btn btn-inverse btn-small disabled" rel="prev" >
Next <i class="icon-arrow-right icon-white"></i> Next <i class="icon-arrow-right icon-white"></i>
</a> </a>
<a class="repo-link btn btn-inverse btn-small " rel="next" href="../funding/"> <a class="repo-link btn btn-inverse btn-small " rel="next" href="../funding/">
@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="./">Release Notes</a> <a href="./">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../project-management/">Project management</a> <a href="../project-management/">Project management</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
<li > <li >
<a href="../3.0-announcement/">3.0 Announcement</a> <a href="../3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../3.5-announcement/">3.5 Announcement</a> <a href="../3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../kickstarter-announcement/">Kickstarter Announcement</a> <a href="../kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../release-notes/">Release Notes</a> <a href="../release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>
@ -469,7 +473,7 @@
<li><a href="http://www.cdrf.co">Classy Django REST Framework</a></li> <li><a href="http://www.cdrf.co">Classy Django REST Framework</a></li>
<li><a href="http://drf-schema-adapter.readthedocs.io/en/latest/">DRF-schema-adapter</a></li> <li><a href="http://drf-schema-adapter.readthedocs.io/en/latest/">DRF-schema-adapter</a></li>
</ul> </ul>
<p>Want your Django REST Framework talk/tutorial/article to be added to our website? Or know of a resource that's not yet included here? Please <a href="https://github.com/tomchristie/django-rest-framework">submit a pull request</a> or [email us][mailto:anna@django-rest-framework.org]!</p> <p>Want your Django REST Framework talk/tutorial/article to be added to our website? Or know of a resource that's not yet included here? Please <a href="https://github.com/tomchristie/django-rest-framework">submit a pull request</a> or <a href="mailto:anna@django-rest-framework.org">email us</a>!</p>
</div> <!--/span--> </div> <!--/span-->

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>
@ -609,23 +613,13 @@ print(repr(serializer))
<h2 id="writing-regular-django-views-using-our-serializer"><a class="toclink" href="#writing-regular-django-views-using-our-serializer">Writing regular Django views using our Serializer</a></h2> <h2 id="writing-regular-django-views-using-our-serializer"><a class="toclink" href="#writing-regular-django-views-using-our-serializer">Writing regular Django views using our Serializer</a></h2>
<p>Let's see how we can write some API views using our new Serializer class. <p>Let's see how we can write some API views using our new Serializer class.
For the moment we won't use any of REST framework's other features, we'll just write the views as regular Django views.</p> For the moment we won't use any of REST framework's other features, we'll just write the views as regular Django views.</p>
<p>We'll start off by creating a subclass of HttpResponse that we can use to render any data we return into <code>json</code>.</p>
<p>Edit the <code>snippets/views.py</code> file, and add the following.</p> <p>Edit the <code>snippets/views.py</code> file, and add the following.</p>
<pre><code>from django.http import HttpResponse <pre><code>from django.http import HttpResponse, JsonResponse
from django.views.decorators.csrf import csrf_exempt from django.views.decorators.csrf import csrf_exempt
from rest_framework.renderers import JSONRenderer from rest_framework.renderers import JSONRenderer
from rest_framework.parsers import JSONParser from rest_framework.parsers import JSONParser
from snippets.models import Snippet from snippets.models import Snippet
from snippets.serializers import SnippetSerializer from snippets.serializers import SnippetSerializer
class JSONResponse(HttpResponse):
"""
An HttpResponse that renders its content into JSON.
"""
def __init__(self, data, **kwargs):
content = JSONRenderer().render(data)
kwargs['content_type'] = 'application/json'
super(JSONResponse, self).__init__(content, **kwargs)
</code></pre> </code></pre>
<p>The root of our API is going to be a view that supports listing all the existing snippets, or creating a new snippet.</p> <p>The root of our API is going to be a view that supports listing all the existing snippets, or creating a new snippet.</p>
<pre><code>@csrf_exempt <pre><code>@csrf_exempt
@ -636,15 +630,15 @@ def snippet_list(request):
if request.method == 'GET': if request.method == 'GET':
snippets = Snippet.objects.all() snippets = Snippet.objects.all()
serializer = SnippetSerializer(snippets, many=True) serializer = SnippetSerializer(snippets, many=True)
return JSONResponse(serializer.data) return JsonResponse(serializer.data, safe=False)
elif request.method == 'POST': elif request.method == 'POST':
data = JSONParser().parse(request) data = JSONParser().parse(request)
serializer = SnippetSerializer(data=data) serializer = SnippetSerializer(data=data)
if serializer.is_valid(): if serializer.is_valid():
serializer.save() serializer.save()
return JSONResponse(serializer.data, status=201) return JsonResponse(serializer.data, status=201)
return JSONResponse(serializer.errors, status=400) return JsonResponse(serializer.errors, status=400)
</code></pre> </code></pre>
<p>Note that because we want to be able to POST to this view from clients that won't have a CSRF token we need to mark the view as <code>csrf_exempt</code>. This isn't something that you'd normally want to do, and REST framework views actually use more sensible behavior than this, but it'll do for our purposes right now.</p> <p>Note that because we want to be able to POST to this view from clients that won't have a CSRF token we need to mark the view as <code>csrf_exempt</code>. This isn't something that you'd normally want to do, and REST framework views actually use more sensible behavior than this, but it'll do for our purposes right now.</p>
<p>We'll also need a view which corresponds to an individual snippet, and can be used to retrieve, update or delete the snippet.</p> <p>We'll also need a view which corresponds to an individual snippet, and can be used to retrieve, update or delete the snippet.</p>
@ -660,15 +654,15 @@ def snippet_detail(request, pk):
if request.method == 'GET': if request.method == 'GET':
serializer = SnippetSerializer(snippet) serializer = SnippetSerializer(snippet)
return JSONResponse(serializer.data) return JsonResponse(serializer.data)
elif request.method == 'PUT': elif request.method == 'PUT':
data = JSONParser().parse(request) data = JSONParser().parse(request)
serializer = SnippetSerializer(snippet, data=data) serializer = SnippetSerializer(snippet, data=data)
if serializer.is_valid(): if serializer.is_valid():
serializer.save() serializer.save()
return JSONResponse(serializer.data) return JsonResponse(serializer.data)
return JSONResponse(serializer.errors, status=400) return JsonResponse(serializer.errors, status=400)
elif request.method == 'DELETE': elif request.method == 'DELETE':
snippet.delete() snippet.delete()

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>

View File

@ -286,6 +286,10 @@
<a href="../../topics/project-management/">Project management</a> <a href="../../topics/project-management/">Project management</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
<li > <li >
<a href="../../topics/3.0-announcement/">3.0 Announcement</a> <a href="../../topics/3.0-announcement/">3.0 Announcement</a>
</li> </li>
@ -310,6 +314,10 @@
<a href="../../topics/3.5-announcement/">3.5 Announcement</a> <a href="../../topics/3.5-announcement/">3.5 Announcement</a>
</li> </li>
<li >
<a href="../../topics/3.6-announcement/">3.6 Announcement</a>
</li>
<li > <li >
<a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a> <a href="../../topics/kickstarter-announcement/">Kickstarter Announcement</a>
</li> </li>
@ -326,10 +334,6 @@
<a href="../../topics/release-notes/">Release Notes</a> <a href="../../topics/release-notes/">Release Notes</a>
</li> </li>
<li >
<a href="../../topics/jobs/">Jobs</a>
</li>
</ul> </ul>
</li> </li>