Skip to content

Commit fd207b6

Browse files
committed
Deployed cf8a5b5 with MkDocs version: 1.0.4
1 parent 77a24aa commit fd207b6

File tree

78 files changed

+394
-456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+394
-456
lines changed

404.html

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,18 @@
55
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
66
<meta charset="utf-8">
77
<title>Django REST framework</title>
8-
<link href="//img/favicon.ico" rel="icon" type="image/x-icon">
8+
<link href="/img/favicon.ico" rel="icon" type="image/x-icon">
99
<link rel="canonical" href="/." />
1010
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1111
<meta name="description" content="Django, API, REST">
1212
<meta name="author" content="Tom Christie">
1313

1414
<!-- Le styles -->
15-
<link href="//css/prettify.css" rel="stylesheet">
16-
<link href="//css/bootstrap.css" rel="stylesheet">
17-
<link href="//css/bootstrap-responsive.css" rel="stylesheet">
18-
<link href="//css/default.css" rel="stylesheet">
15+
<link href="/css/prettify.css" rel="stylesheet">
16+
<link href="/css/bootstrap.css" rel="stylesheet">
17+
<link href="/css/bootstrap-responsive.css" rel="stylesheet">
18+
<link href="/css/default.css" rel="stylesheet">
1919

20-
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
21-
<!--[if lt IE 9]>
22-
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
23-
<![endif]-->
2420

2521
<script type="text/javascript">
2622
var _gaq = _gaq || [];
@@ -406,7 +402,7 @@ <h3 id="myModalLabel">Documentation search</h3>
406402

407403

408404
<div class="promo">
409-
<hr/>
405+
410406
<div id="sidebarInclude">
411407
</div>
412408
</ul>
@@ -419,7 +415,7 @@ <h3 id="myModalLabel">Documentation search</h3>
419415

420416
<h1 id="404-page-not-found" style="text-align: center">404</h1>
421417
<p style="text-align: center"><strong>Page not found</strong></p>
422-
<p style="text-align: center">Try the <a href="https://www.django-rest-framework.org/">homepage</a>, or <a href="#searchModal" data-toggle="modal">search the documentation</a>.</p>
418+
<p style="text-align: center">Try the <a href="/">homepage</a>, or <a href="#mkdocs_search_modal" data-toggle="modal">search the documentation</a>.</p>
423419

424420

425421

@@ -439,10 +435,10 @@ <h1 id="404-page-not-found" style="text-align: center">404</h1>
439435
================================================== -->
440436
<!-- Placed at the end of the document so the pages load faster -->
441437
<script async src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
442-
<script src="//js/jquery-1.8.1-min.js"></script>
443-
<script src="//js/prettify-1.0.js"></script>
444-
<script src="//js/bootstrap-2.1.1-min.js"></script>
445-
<script src="//js/theme.js"></script>
438+
<script src="/js/jquery-1.8.1-min.js"></script>
439+
<script src="/js/prettify-1.0.js"></script>
440+
<script src="/js/bootstrap-2.1.1-min.js"></script>
441+
<script src="/js/theme.js"></script>
446442

447443
<script>var base_url = '/';</script>
448444

api-guide/authentication/index.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
<link href="../../css/bootstrap-responsive.css" rel="stylesheet">
1818
<link href="../../css/default.css" rel="stylesheet">
1919

20-
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
21-
<!--[if lt IE 9]>
22-
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
23-
<![endif]-->
2420

2521
<script type="text/javascript">
2622
var _gaq = _gaq || [];
@@ -488,7 +484,7 @@ <h3 id="myModalLabel">Documentation search</h3>
488484
</li>
489485

490486
<li>
491-
<a href="#django-rest-auth">django-rest-auth</a>
487+
<a href="#django-rest-auth-dj-rest-auth">django-rest-auth / dj-rest-auth</a>
492488
</li>
493489

494490
<li>
@@ -746,7 +742,7 @@ <h2 id="remoteuserauthentication"><a class="toclink" href="#remoteuserauthentica
746742
<p>Consult your web server's documentation for information about configuring an authentication method, e.g.:</p>
747743
<ul>
748744
<li><a href="https://httpd.apache.org/docs/2.4/howto/auth.html">Apache Authentication How-To</a></li>
749-
<li><a href="https://www.nginx.com/resources/admin-guide/#restricting_access">NGINX (Restricting Access)</a></li>
745+
<li><a href="https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/">NGINX (Restricting Access)</a></li>
750746
</ul>
751747
<h1 id="custom-authentication"><a class="toclink" href="#custom-authentication">Custom authentication</a></h1>
752748
<p>To implement a custom authentication scheme, subclass <code>BaseAuthentication</code> and override the <code>.authenticate(self, request)</code> method. The method should return a two-tuple of <code>(user, auth)</code> if authentication succeeds, or <code>None</code> otherwise.</p>
@@ -818,8 +814,13 @@ <h2 id="http-signature-authentication"><a class="toclink" href="#http-signature-
818814
<p>HTTP Signature (currently a <a href="https://datatracker.ietf.org/doc/draft-cavage-http-signatures/">IETF draft</a>) provides a way to achieve origin authentication and message integrity for HTTP messages. Similar to <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Amazon's HTTP Signature scheme</a>, used by many of its services, it permits stateless, per-request authentication. <a href="https://github.com/etoccalino/">Elvio Toccalino</a> maintains the <a href="https://github.com/etoccalino/django-rest-framework-httpsignature">djangorestframework-httpsignature</a> (outdated) package which provides an easy to use HTTP Signature Authentication mechanism. You can use the updated fork version of <a href="https://github.com/etoccalino/django-rest-framework-httpsignature">djangorestframework-httpsignature</a>, which is <a href="https://github.com/ahknight/drf-httpsig">drf-httpsig</a>.</p>
819815
<h2 id="djoser"><a class="toclink" href="#djoser">Djoser</a></h2>
820816
<p><a href="https://github.com/sunscrapers/djoser">Djoser</a> library provides a set of views to handle basic actions such as registration, login, logout, password reset and account activation. The package works with a custom user model and it uses token based authentication. This is a ready to use REST implementation of Django authentication system.</p>
821-
<h2 id="django-rest-auth"><a class="toclink" href="#django-rest-auth">django-rest-auth</a></h2>
822-
<p><a href="https://github.com/Tivix/django-rest-auth">Django-rest-auth</a> library provides a set of REST API endpoints for registration, authentication (including social media authentication), password reset, retrieve and update user details, etc. By having these API endpoints, your client apps such as AngularJS, iOS, Android, and others can communicate to your Django backend site independently via REST APIs for user management.</p>
817+
<h2 id="django-rest-auth-dj-rest-auth"><a class="toclink" href="#django-rest-auth-dj-rest-auth">django-rest-auth / dj-rest-auth</a></h2>
818+
<p>This library provides a set of REST API endpoints for registration, authentication (including social media authentication), password reset, retrieve and update user details, etc. By having these API endpoints, your client apps such as AngularJS, iOS, Android, and others can communicate to your Django backend site independently via REST APIs for user management.</p>
819+
<p>There are currently two forks of this project.</p>
820+
<ul>
821+
<li><a href="https://github.com/Tivix/django-rest-auth">Django-rest-auth</a> is the original project, <a href="https://github.com/Tivix/django-rest-auth/issues/568">but is not currently receiving updates</a>.</li>
822+
<li><a href="https://github.com/jazzband/dj-rest-auth">Dj-rest-auth</a> is a newer fork of the project.</li>
823+
</ul>
823824
<h2 id="django-rest-framework-social-oauth2"><a class="toclink" href="#django-rest-framework-social-oauth2">django-rest-framework-social-oauth2</a></h2>
824825
<p><a href="https://github.com/PhilipGarnero/django-rest-framework-social-oauth2">Django-rest-framework-social-oauth2</a> library provides an easy way to integrate social plugins (facebook, twitter, google, etc.) to your authentication system and an easy oauth2 setup. With this library, you will be able to authenticate users based on external tokens (e.g. facebook access token), convert these tokens to "in-house" oauth2 tokens and use and generate oauth2 tokens to authenticate your users.</p>
825826
<h2 id="django-rest-knox"><a class="toclink" href="#django-rest-knox">django-rest-knox</a></h2>

api-guide/caching/index.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
<link href="../../css/bootstrap-responsive.css" rel="stylesheet">
1818
<link href="../../css/default.css" rel="stylesheet">
1919

20-
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
21-
<!--[if lt IE 9]>
22-
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
23-
<![endif]-->
2420

2521
<script type="text/javascript">
2622
var _gaq = _gaq || [];

api-guide/content-negotiation/index.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
<link href="../../css/bootstrap-responsive.css" rel="stylesheet">
1818
<link href="../../css/default.css" rel="stylesheet">
1919

20-
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
21-
<!--[if lt IE 9]>
22-
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
23-
<![endif]-->
2420

2521
<script type="text/javascript">
2622
var _gaq = _gaq || [];

api-guide/exceptions/index.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
<link href="../../css/bootstrap-responsive.css" rel="stylesheet">
1818
<link href="../../css/default.css" rel="stylesheet">
1919

20-
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
21-
<!--[if lt IE 9]>
22-
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
23-
<![endif]-->
2420

2521
<script type="text/javascript">
2622
var _gaq = _gaq || [];

api-guide/fields/index.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
<link href="../../css/bootstrap-responsive.css" rel="stylesheet">
1818
<link href="../../css/default.css" rel="stylesheet">
1919

20-
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
21-
<!--[if lt IE 9]>
22-
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
23-
<![endif]-->
2420

2521
<script type="text/javascript">
2622
var _gaq = _gaq || [];
@@ -1041,11 +1037,10 @@ <h1 id="custom-fields"><a class="toclink" href="#custom-fields">Custom fields</a
10411037
<p>If you want to create a custom field, you'll need to subclass <code>Field</code> and then override either one or both of the <code>.to_representation()</code> and <code>.to_internal_value()</code> methods. These two methods are used to convert between the initial datatype, and a primitive, serializable datatype. Primitive datatypes will typically be any of a number, string, boolean, <code>date</code>/<code>time</code>/<code>datetime</code> or <code>None</code>. They may also be any list or dictionary like object that only contains other primitive objects. Other types might be supported, depending on the renderer that you are using.</p>
10421038
<p>The <code>.to_representation()</code> method is called to convert the initial datatype into a primitive, serializable datatype.</p>
10431039
<p>The <code>to_internal_value()</code> method is called to restore a primitive datatype into its internal python representation. This method should raise a <code>serializers.ValidationError</code> if the data is invalid.</p>
1044-
<p>Note that the <code>WritableField</code> class that was present in version 2.x no longer exists. You should subclass <code>Field</code> and override <code>to_internal_value()</code> if the field supports data input.</p>
10451040
<h2 id="examples"><a class="toclink" href="#examples">Examples</a></h2>
10461041
<h3 id="a-basic-custom-field"><a class="toclink" href="#a-basic-custom-field">A Basic Custom Field</a></h3>
10471042
<p>Let's look at an example of serializing a class that represents an RGB color value:</p>
1048-
<pre><code>class Color(object):
1043+
<pre><code>class Color:
10491044
"""
10501045
A color represented in the RGB colorspace.
10511046
"""

api-guide/filtering/index.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
<link href="../../css/bootstrap-responsive.css" rel="stylesheet">
1818
<link href="../../css/default.css" rel="stylesheet">
1919

20-
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
21-
<!--[if lt IE 9]>
22-
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
23-
<![endif]-->
2420

2521
<script type="text/javascript">
2622
var _gaq = _gaq || [];
@@ -674,12 +670,15 @@ <h2 id="searchfilter"><a class="toclink" href="#searchfilter">SearchFilter</a></
674670
<p>You can also perform a related lookup on a ForeignKey or ManyToManyField with the lookup API double-underscore notation:</p>
675671
<pre><code>search_fields = ['username', 'email', 'profile__profession']
676672
</code></pre>
673+
<p>For <a href="https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/fields/#jsonfield">JSONField</a> and <a href="https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/fields/#hstorefield">HStoreField</a> fields you can filter based on nested values within the data structure using the same double-underscore notation:</p>
674+
<pre><code>search_fields = ['data__breed', 'data__owner__other_pets__0__name']
675+
</code></pre>
677676
<p>By default, searches will use case-insensitive partial matches. The search parameter may contain multiple search terms, which should be whitespace and/or comma separated. If multiple search terms are used then objects will be returned in the list only if all the provided terms are matched.</p>
678677
<p>The search behavior may be restricted by prepending various characters to the <code>search_fields</code>.</p>
679678
<ul>
680679
<li>'^' Starts-with search.</li>
681680
<li>'=' Exact matches.</li>
682-
<li>'@' Full-text search. (Currently only supported Django's MySQL backend.)</li>
681+
<li>'@' Full-text search. (Currently only supported Django's <a href="https://docs.djangoproject.com/en/dev/ref/contrib/postgres/search/">PostgreSQL backend</a>.)</li>
683682
<li>'$' Regex search.</li>
684683
</ul>
685684
<p>For example:</p>

api-guide/format-suffixes/index.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
<link href="../../css/bootstrap-responsive.css" rel="stylesheet">
1818
<link href="../../css/default.css" rel="stylesheet">
1919

20-
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
21-
<!--[if lt IE 9]>
22-
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
23-
<![endif]-->
2420

2521
<script type="text/javascript">
2622
var _gaq = _gaq || [];

api-guide/generic-views/index.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
<link href="../../css/bootstrap-responsive.css" rel="stylesheet">
1818
<link href="../../css/default.css" rel="stylesheet">
1919

20-
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
21-
<!--[if lt IE 9]>
22-
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
23-
<![endif]-->
2420

2521
<script type="text/javascript">
2622
var _gaq = _gaq || [];
@@ -678,7 +674,6 @@ <h4 id="get_serializer_classself"><a class="toclink" href="#get_serializer_class
678674
raise ValidationError('You have already signed up')
679675
serializer.save(user=self.request.user)
680676
</code></pre>
681-
<p><strong>Note</strong>: These methods replace the old-style version 2.x <code>pre_save</code>, <code>post_save</code>, <code>pre_delete</code> and <code>post_delete</code> methods, which are no longer available.</p>
682677
<p><strong>Other methods</strong>:</p>
683678
<p>You won't typically need to override the following methods, although you might need to call into them if you're writing custom views using <code>GenericAPIView</code>.</p>
684679
<ul>
@@ -755,7 +750,7 @@ <h1 id="customizing-the-generic-views"><a class="toclink" href="#customizing-the
755750
<p>Often you'll want to use the existing generic views, but use some slightly customized behavior. If you find yourself reusing some bit of customized behavior in multiple places, you might want to refactor the behavior into a common class that you can then just apply to any view or viewset as needed.</p>
756751
<h2 id="creating-custom-mixins"><a class="toclink" href="#creating-custom-mixins">Creating custom mixins</a></h2>
757752
<p>For example, if you need to lookup objects based on multiple fields in the URL conf, you could create a mixin class like the following:</p>
758-
<pre><code>class MultipleFieldLookupMixin(object):
753+
<pre><code>class MultipleFieldLookupMixin:
759754
"""
760755
Apply this mixin to any view or viewset to get multiple field filtering
761756
based on a `lookup_fields` attribute, instead of the default single field filtering.

api-guide/metadata/index.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
<link href="../../css/bootstrap-responsive.css" rel="stylesheet">
1818
<link href="../../css/default.css" rel="stylesheet">
1919

20-
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
21-
<!--[if lt IE 9]>
22-
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
23-
<![endif]-->
2420

2521
<script type="text/javascript">
2622
var _gaq = _gaq || [];
@@ -515,7 +511,7 @@ <h2 id="creating-schema-endpoints"><a class="toclink" href="#creating-schema-end
515511
<p>If you have specific requirements for creating schema endpoints that are accessed with regular <code>GET</code> requests, you might consider re-using the metadata API for doing so.</p>
516512
<p>For example, the following additional route could be used on a viewset to provide a linkable schema endpoint.</p>
517513
<pre><code>@action(methods=['GET'], detail=False)
518-
def schema(self, request):
514+
def api_schema(self, request):
519515
meta = self.metadata_class()
520516
data = meta.determine_metadata(request, self)
521517
return Response(data)

0 commit comments

Comments
 (0)