Skip to content

Commit e7f39c4

Browse files
committed
Deployed 6a8575b with MkDocs version: 0.16.3
1 parent b4204cf commit e7f39c4

File tree

79 files changed

+3898
-3880
lines changed

Some content is hidden

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

79 files changed

+3898
-3880
lines changed

404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ <h1 id="404-page-not-found" style="text-align: center">404</h1>
437437
<script src="/js/jquery-1.8.1-min.js"></script>
438438
<script src="/js/prettify-1.0.js"></script>
439439
<script src="/js/bootstrap-2.1.1-min.js"></script>
440-
<script src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
440+
<script async src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
441441
<script>var base_url = '';</script>
442442
<script src="/mkdocs/js/require.js"></script>
443443
<script src="/js/theme.js"></script>

api-guide/authentication/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ <h2 id="example"><a class="toclink" href="#example">Example</a></h2>
780780
<h1 id="third-party-packages"><a class="toclink" href="#third-party-packages">Third party packages</a></h1>
781781
<p>The following third party packages are also available.</p>
782782
<h2 id="django-oauth-toolkit"><a class="toclink" href="#django-oauth-toolkit">Django OAuth Toolkit</a></h2>
783-
<p>The <a href="https://github.com/evonove/django-oauth-toolkit">Django OAuth Toolkit</a> package provides OAuth 2.0 support, and works with Python 2.7 and Python 3.3+. The package is maintained by <a href="https://github.com/evonove/">Evonove</a> and uses the excellent <a href="https://github.com/idan/oauthlib">OAuthLib</a>. The package is well documented, and well supported and is currently our <strong>recommended package for OAuth 2.0 support</strong>.</p>
783+
<p>The <a href="https://github.com/evonove/django-oauth-toolkit">Django OAuth Toolkit</a> package provides OAuth 2.0 support and works with Python 3.4+. The package is maintained by <a href="https://github.com/evonove/">Evonove</a> and uses the excellent <a href="https://github.com/idan/oauthlib">OAuthLib</a>. The package is well documented, and well supported and is currently our <strong>recommended package for OAuth 2.0 support</strong>.</p>
784784
<h4 id="installation-configuration"><a class="toclink" href="#installation-configuration">Installation &amp; configuration</a></h4>
785785
<p>Install using <code>pip</code>.</p>
786786
<pre><code>pip install django-oauth-toolkit
@@ -842,7 +842,7 @@ <h2 id="drfpasswordless"><a class="toclink" href="#drfpasswordless">drfpasswordl
842842
<script src="../../js/jquery-1.8.1-min.js"></script>
843843
<script src="../../js/prettify-1.0.js"></script>
844844
<script src="../../js/bootstrap-2.1.1-min.js"></script>
845-
<script src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
845+
<script async src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
846846
<script>var base_url = '../..';</script>
847847
<script src="../../mkdocs/js/require.js"></script>
848848
<script src="../../js/theme.js"></script>

api-guide/caching/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ <h2 id="using-cache-with-apiview-and-viewsets"><a class="toclink" href="#using-c
487487
<script src="../../js/jquery-1.8.1-min.js"></script>
488488
<script src="../../js/prettify-1.0.js"></script>
489489
<script src="../../js/bootstrap-2.1.1-min.js"></script>
490-
<script src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
490+
<script async src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
491491
<script>var base_url = '../..';</script>
492492
<script src="../../mkdocs/js/require.js"></script>
493493
<script src="../../js/theme.js"></script>

api-guide/content-negotiation/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ <h2 id="setting-the-content-negotiation"><a class="toclink" href="#setting-the-c
536536
<script src="../../js/jquery-1.8.1-min.js"></script>
537537
<script src="../../js/prettify-1.0.js"></script>
538538
<script src="../../js/bootstrap-2.1.1-min.js"></script>
539-
<script src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
539+
<script async src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
540540
<script>var base_url = '../..';</script>
541541
<script src="../../mkdocs/js/require.js"></script>
542542
<script src="../../js/theme.js"></script>

api-guide/exceptions/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ <h2 id="rest_frameworkexceptionsbad_request"><a class="toclink" href="#rest_fram
694694
<script src="../../js/jquery-1.8.1-min.js"></script>
695695
<script src="../../js/prettify-1.0.js"></script>
696696
<script src="../../js/bootstrap-2.1.1-min.js"></script>
697-
<script src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
697+
<script async src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
698698
<script>var base_url = '../..';</script>
699699
<script src="../../mkdocs/js/require.js"></script>
700700
<script src="../../js/theme.js"></script>

api-guide/fields/index.html

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -930,9 +930,10 @@ <h2 id="imagefield"><a class="toclink" href="#imagefield">ImageField</a></h2>
930930
<h1 id="composite-fields"><a class="toclink" href="#composite-fields">Composite fields</a></h1>
931931
<h2 id="listfield"><a class="toclink" href="#listfield">ListField</a></h2>
932932
<p>A field class that validates a list of objects.</p>
933-
<p><strong>Signature</strong>: <code>ListField(child=&lt;A_FIELD_INSTANCE&gt;, min_length=None, max_length=None)</code></p>
933+
<p><strong>Signature</strong>: <code>ListField(child=&lt;A_FIELD_INSTANCE&gt;, allow_empty=True, min_length=None, max_length=None)</code></p>
934934
<ul>
935935
<li><code>child</code> - A field instance that should be used for validating the objects in the list. If this argument is not provided then objects in the list will not be validated.</li>
936+
<li><code>allow_empty</code> - Designates if empty lists are allowed.</li>
936937
<li><code>min_length</code> - Validates that the list contains no fewer than this number of elements.</li>
937938
<li><code>max_length</code> - Validates that the list contains no more than this number of elements.</li>
938939
</ul>
@@ -948,9 +949,10 @@ <h2 id="listfield"><a class="toclink" href="#listfield">ListField</a></h2>
948949
<p>We can now reuse our custom <code>StringListField</code> class throughout our application, without having to provide a <code>child</code> argument to it.</p>
949950
<h2 id="dictfield"><a class="toclink" href="#dictfield">DictField</a></h2>
950951
<p>A field class that validates a dictionary of objects. The keys in <code>DictField</code> are always assumed to be string values.</p>
951-
<p><strong>Signature</strong>: <code>DictField(child=&lt;A_FIELD_INSTANCE&gt;)</code></p>
952+
<p><strong>Signature</strong>: <code>DictField(child=&lt;A_FIELD_INSTANCE&gt;, allow_empty=True)</code></p>
952953
<ul>
953954
<li><code>child</code> - A field instance that should be used for validating the values in the dictionary. If this argument is not provided then values in the mapping will not be validated.</li>
955+
<li><code>allow_empty</code> - Designates if empty dictionaries are allowed.</li>
954956
</ul>
955957
<p>For example, to create a field that validates a mapping of strings to strings, you would write something like this:</p>
956958
<pre><code>document = DictField(child=CharField())
@@ -961,16 +963,18 @@ <h2 id="dictfield"><a class="toclink" href="#dictfield">DictField</a></h2>
961963
</code></pre>
962964
<h2 id="hstorefield"><a class="toclink" href="#hstorefield">HStoreField</a></h2>
963965
<p>A preconfigured <code>DictField</code> that is compatible with Django's postgres <code>HStoreField</code>.</p>
964-
<p><strong>Signature</strong>: <code>HStoreField(child=&lt;A_FIELD_INSTANCE&gt;)</code></p>
966+
<p><strong>Signature</strong>: <code>HStoreField(child=&lt;A_FIELD_INSTANCE&gt;, allow_empty=True)</code></p>
965967
<ul>
966968
<li><code>child</code> - A field instance that is used for validating the values in the dictionary. The default child field accepts both empty strings and null values.</li>
969+
<li><code>allow_empty</code> - Designates if empty dictionaries are allowed.</li>
967970
</ul>
968971
<p>Note that the child field <strong>must</strong> be an instance of <code>CharField</code>, as the hstore extension stores values as strings.</p>
969972
<h2 id="jsonfield"><a class="toclink" href="#jsonfield">JSONField</a></h2>
970973
<p>A field class that validates that the incoming data structure consists of valid JSON primitives. In its alternate binary mode, it will represent and validate JSON-encoded binary strings.</p>
971-
<p><strong>Signature</strong>: <code>JSONField(binary)</code></p>
974+
<p><strong>Signature</strong>: <code>JSONField(binary, encoder)</code></p>
972975
<ul>
973976
<li><code>binary</code> - If set to <code>True</code> then the field will output and validate a JSON encoded string, rather than a primitive data structure. Defaults to <code>False</code>.</li>
977+
<li><code>encoder</code> - Use this JSON encoder to serialize input object. Defaults to <code>None</code>.</li>
974978
</ul>
975979
<hr />
976980
<h1 id="miscellaneous-fields"><a class="toclink" href="#miscellaneous-fields">Miscellaneous fields</a></h1>
@@ -1065,7 +1069,7 @@ <h3 id="raising-validation-errors"><a class="toclink" href="#raising-validation-
10651069
<p>Our <code>ColorField</code> class above currently does not perform any data validation.
10661070
To indicate invalid data, we should raise a <code>serializers.ValidationError</code>, like so:</p>
10671071
<pre><code>def to_internal_value(self, data):
1068-
if not isinstance(data, six.text_type):
1072+
if not isinstance(data, str):
10691073
msg = 'Incorrect type. Expected a string, but got %s'
10701074
raise ValidationError(msg % type(data).__name__)
10711075

@@ -1088,7 +1092,7 @@ <h3 id="raising-validation-errors"><a class="toclink" href="#raising-validation-
10881092
}
10891093

10901094
def to_internal_value(self, data):
1091-
if not isinstance(data, six.text_type):
1095+
if not isinstance(data, str):
10921096
self.fail('incorrect_type', input_type=type(data).__name__)
10931097

10941098
if not re.match(r'^rgb\([0-9]+,[0-9]+,[0-9]+\)$', data):
@@ -1257,7 +1261,7 @@ <h2 id="django-rest-framework-hstore"><a class="toclink" href="#django-rest-fram
12571261
<script src="../../js/jquery-1.8.1-min.js"></script>
12581262
<script src="../../js/prettify-1.0.js"></script>
12591263
<script src="../../js/bootstrap-2.1.1-min.js"></script>
1260-
<script src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
1264+
<script async src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
12611265
<script>var base_url = '../..';</script>
12621266
<script src="../../mkdocs/js/require.js"></script>
12631267
<script src="../../js/theme.js"></script>

api-guide/filtering/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ <h2 id="drf-url-filters"><a class="toclink" href="#drf-url-filters">drf-url-filt
828828
<script src="../../js/jquery-1.8.1-min.js"></script>
829829
<script src="../../js/prettify-1.0.js"></script>
830830
<script src="../../js/bootstrap-2.1.1-min.js"></script>
831-
<script src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
831+
<script async src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
832832
<script>var base_url = '../..';</script>
833833
<script src="../../mkdocs/js/require.js"></script>
834834
<script src="../../js/theme.js"></script>

api-guide/format-suffixes/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ <h2 id="accept-headers-vs-format-suffixes"><a class="toclink" href="#accept-head
523523
<script src="../../js/jquery-1.8.1-min.js"></script>
524524
<script src="../../js/prettify-1.0.js"></script>
525525
<script src="../../js/bootstrap-2.1.1-min.js"></script>
526-
<script src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
526+
<script async src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
527527
<script>var base_url = '../..';</script>
528528
<script src="../../mkdocs/js/require.js"></script>
529529
<script src="../../js/theme.js"></script>

api-guide/generic-views/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ <h2 id="django-rest-multiple-models"><a class="toclink" href="#django-rest-multi
822822
<script src="../../js/jquery-1.8.1-min.js"></script>
823823
<script src="../../js/prettify-1.0.js"></script>
824824
<script src="../../js/bootstrap-2.1.1-min.js"></script>
825-
<script src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
825+
<script async src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
826826
<script>var base_url = '../..';</script>
827827
<script src="../../mkdocs/js/require.js"></script>
828828
<script src="../../js/theme.js"></script>

api-guide/metadata/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ <h2 id="drf-schema-adapter"><a class="toclink" href="#drf-schema-adapter">DRF-sc
565565
<script src="../../js/jquery-1.8.1-min.js"></script>
566566
<script src="../../js/prettify-1.0.js"></script>
567567
<script src="../../js/bootstrap-2.1.1-min.js"></script>
568-
<script src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
568+
<script async src="https://fund.django-rest-framework.org/sidebar_include.js"></script>
569569
<script>var base_url = '../..';</script>
570570
<script src="../../mkdocs/js/require.js"></script>
571571
<script src="../../js/theme.js"></script>

0 commit comments

Comments
 (0)