Skip to content

Commit 65bf134

Browse files
committed
Deployed 7f16ed7 with MkDocs version: 0.16.3
1 parent 3769016 commit 65bf134

File tree

10 files changed

+3794
-3777
lines changed

10 files changed

+3794
-3777
lines changed

api-guide/fields/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,10 +831,11 @@ <h1 id="date-and-time-fields"><a class="toclink" href="#date-and-time-fields">Da
831831
<h2 id="datetimefield"><a class="toclink" href="#datetimefield">DateTimeField</a></h2>
832832
<p>A date and time representation.</p>
833833
<p>Corresponds to <code>django.db.models.fields.DateTimeField</code>.</p>
834-
<p><strong>Signature:</strong> <code>DateTimeField(format=api_settings.DATETIME_FORMAT, input_formats=None)</code></p>
834+
<p><strong>Signature:</strong> <code>DateTimeField(format=api_settings.DATETIME_FORMAT, input_formats=None, default_timezone=None)</code></p>
835835
<ul>
836836
<li><code>format</code> - A string representing the output format. If not specified, this defaults to the same value as the <code>DATETIME_FORMAT</code> settings key, which will be <code>'iso-8601'</code> unless set. Setting to a format string indicates that <code>to_representation</code> return values should be coerced to string output. Format strings are described below. Setting this value to <code>None</code> indicates that Python <code>datetime</code> objects should be returned by <code>to_representation</code>. In this case the datetime encoding will be determined by the renderer.</li>
837837
<li><code>input_formats</code> - A list of strings representing the input formats which may be used to parse the date. If not specified, the <code>DATETIME_INPUT_FORMATS</code> setting will be used, which defaults to <code>['iso-8601']</code>.</li>
838+
<li><code>default_timezone</code> - A <code>pytz.timezone</code> representing the timezone. If not specified and the <code>USE_TZ</code> setting is enabled, this defaults to the <a href="https://docs.djangoproject.com/en/stable/topics/i18n/timezones/#default-time-zone-and-current-time-zone">current timezone</a>. If <code>USE_TZ</code> is disabled, then datetime objects will be naive.</li>
838839
</ul>
839840
<h4 id="datetimefield-format-strings"><a class="toclink" href="#datetimefield-format-strings"><code>DateTimeField</code> format strings.</a></h4>
840841
<p>Format strings may either be <a href="https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior">Python strftime formats</a> which explicitly specify the format, or the special string <code>'iso-8601'</code>, which indicates that <a href="https://www.w3.org/TR/NOTE-datetime">ISO 8601</a> style datetimes should be used. (eg <code>'2013-01-29T12:34:56.000000Z'</code>)</p>

api-guide/permissions/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ <h2 id="object-level-permissions"><a class="toclink" href="#object-level-permiss
547547
</code></pre>
548548
<hr />
549549
<p><strong>Note</strong>: With the exception of <code>DjangoObjectPermissions</code>, the provided
550-
permission classes in <code>rest_framework.permssions</code> <strong>do not</strong> implement the
550+
permission classes in <code>rest_framework.permissions</code> <strong>do not</strong> implement the
551551
methods necessary to check object permissions.</p>
552552
<p>If you wish to use the provided permission classes in order to check object
553553
permissions, <strong>you must</strong> subclass them and implement the

api-guide/schemas/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ <h2 id="install-core-api-pyyaml"><a class="toclink" href="#install-core-api-pyya
539539
<pre><code>pip install coreapi pyyaml
540540
</code></pre>
541541
<h2 id="quickstart"><a class="toclink" href="#quickstart">Quickstart</a></h2>
542-
<p>There are two different ways you can serve a schema description for you API.</p>
542+
<p>There are two different ways you can serve a schema description for your API.</p>
543543
<h3 id="generating-a-schema-with-the-generateschema-management-command"><a class="toclink" href="#generating-a-schema-with-the-generateschema-management-command">Generating a schema with the <code>generateschema</code> management command</a></h3>
544544
<p>To generate a static API schema, use the <code>generateschema</code> management command.</p>
545545
<pre><code class="shell">$ python manage.py generateschema &gt; schema.yml

api-guide/serializers/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,6 +1085,7 @@ <h2 id="additional-keyword-arguments"><a class="toclink" href="#additional-keywo
10851085
user.save()
10861086
return user
10871087
</code></pre>
1088+
<p>Please keep in mind that, if the field has already been explicitly declared on the serializer class, then the <code>extra_kwargs</code> option will be ignored.</p>
10881089
<h2 id="relational-fields"><a class="toclink" href="#relational-fields">Relational fields</a></h2>
10891090
<p>When serializing model instances, there are a number of different ways you might choose to represent relationships. The default representation for <code>ModelSerializer</code> is to use the primary keys of the related instances.</p>
10901091
<p>Alternative representations include serializing using hyperlinks, serializing complete nested representations, or serializing with a custom representation.</p>
@@ -1111,7 +1112,7 @@ <h3 id="build_standard_fieldself-field_name-model_field"><a class="toclink" href
11111112
<p>The default implementation returns a serializer class based on the <code>serializer_field_mapping</code> attribute.</p>
11121113
<h3 id="build_relational_fieldself-field_name-relation_info"><a class="toclink" href="#build_relational_fieldself-field_name-relation_info"><code>.build_relational_field(self, field_name, relation_info)</code></a></h3>
11131114
<p>Called to generate a serializer field that maps to a relational model field.</p>
1114-
<p>The default implementation returns a serializer class based on the <code>serializer_relational_field</code> attribute.</p>
1115+
<p>The default implementation returns a serializer class based on the <code>serializer_related_field</code> attribute.</p>
11151116
<p>The <code>relation_info</code> argument is a named tuple, that contains <code>model_field</code>, <code>related_model</code>, <code>to_many</code> and <code>has_through_model</code> properties.</p>
11161117
<h3 id="build_nested_fieldself-field_name-relation_info-nested_depth"><a class="toclink" href="#build_nested_fieldself-field_name-relation_info-nested_depth"><code>.build_nested_field(self, field_name, relation_info, nested_depth)</code></a></h3>
11171118
<p>Called to generate a serializer field that maps to a relational model field, when the <code>depth</code> option has been set.</p>
@@ -1375,7 +1376,7 @@ <h4 id="creating-new-base-classes"><a class="toclink" href="#creating-new-base-c
13751376
def to_representation(self, obj):
13761377
for attribute_name in dir(obj):
13771378
attribute = getattr(obj, attribute_name)
1378-
if attribute_name('_'):
1379+
if attribute_name.startswith('_'):
13791380
# Ignore private attributes.
13801381
pass
13811382
elif hasattr(attribute, '__call__'):

community/3.0-announcement/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ <h4 id="creating-new-generic-serializers-with-baseserializer"><a class="toclink"
875875
def to_representation(self, obj):
876876
for attribute_name in dir(obj):
877877
attribute = getattr(obj, attribute_name)
878-
if attribute_name('_'):
878+
if attribute_name.startswith('_'):
879879
# Ignore private attributes.
880880
pass
881881
elif hasattr(attribute, '__call__'):

community/release-notes/index.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,14 @@ <h2 id="upgrading"><a class="toclink" href="#upgrading">Upgrading</a></h2>
505505
</code></pre>
506506
<hr />
507507
<h2 id="39x-series"><a class="toclink" href="#39x-series">3.9.x series</a></h2>
508+
<h3 id="393"><a class="toclink" href="#393">3.9.3</a></h3>
509+
<p><strong>Date</strong>: [29th April 2019]</p>
510+
<p>This is the last Django REST Framework release that will support Python 2.
511+
Be sure to upgrade to Python 3 before upgrading to Django REST Framework 3.10.</p>
512+
<ul>
513+
<li>Adjusted the compat check for django-guardian to allow the last guardian
514+
version (v1.4.9) compatible with Python 2. <a href="https://github.com/encode/django-rest-framework/issues/6613">#6613</a></li>
515+
</ul>
508516
<h3 id="392"><a class="toclink" href="#392">3.9.2</a></h3>
509517
<p><strong>Date</strong>: <a href="https://github.com/encode/django-rest-framework/milestone/71?closed=1">3rd March 2019</a></p>
510518
<ul>
@@ -525,7 +533,7 @@ <h3 id="392"><a class="toclink" href="#392">3.9.2</a></h3>
525533
<li>Introduced <code>RemovedInDRF…Warning</code> classes to simplify deprecations. <a href="https://github.com/encode/django-rest-framework/issues/6480">#6480</a></li>
526534
</ul>
527535
<h3 id="391"><a class="toclink" href="#391">3.9.1</a></h3>
528-
<p><strong>Date</strong>: <a href="https://github.com/encode/django-rest-framework/milestone/71?closed=1">16th Janurary 2019</a></p>
536+
<p><strong>Date</strong>: <a href="https://github.com/encode/django-rest-framework/milestone/71?closed=1">16th January 2019</a></p>
529537
<ul>
530538
<li>Resolve XSS issue in browsable API. <a href="https://github.com/encode/django-rest-framework/issues/6330">#6330</a></li>
531539
<li>Upgrade Bootstrap to 3.4.0 to resolve XSS issue.</li>
@@ -1578,6 +1586,8 @@ <h3 id="300"><a class="toclink" href="#300">3.0.0</a></h3>
15781586
<!-- 3.9.1 -->
15791587

15801588
<!-- 3.9.2 -->
1589+
1590+
<!-- 3.9.3 -->
15811591

15821592

15831593
</div> <!--/span-->

community/third-party-packages/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,7 @@ <h3 id="misc"><a class="toclink" href="#misc">Misc</a></h3>
633633
<li><a href="https://github.com/raphaelgyory/django-rest-messaging">django-rest-messaging</a>, <a href="https://github.com/raphaelgyory/django-rest-messaging-centrifugo">django-rest-messaging-centrifugo</a> and <a href="https://github.com/raphaelgyory/django-rest-messaging-js">django-rest-messaging-js</a> - A real-time pluggable messaging service using DRM.</li>
634634
<li><a href="https://github.com/dealertrack/djangorest-alchemy">djangorest-alchemy</a> - SQLAlchemy support for REST framework.</li>
635635
<li><a href="https://github.com/izimobil/django-rest-framework-datatables">djangorestframework-datatables</a> - Seamless integration between Django REST framework and <a href="https://datatables.net">Datatables</a>.</li>
636+
<li><a href="https://github.com/jozo/django-rest-framework-condition">django-rest-framework-condition</a> - Decorators for managing HTTP cache headers for Django REST framework (ETag and Last-modified).</li>
636637
</ul>
637638

638639

mkdocs/search_index.json

Lines changed: 3709 additions & 3704 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)