mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-29 02:34:13 +03:00
Deployed 2bf082a
with MkDocs version: 0.15.3
This commit is contained in:
parent
8e6452fe19
commit
bda1cea4e6
|
@ -541,14 +541,14 @@ for your project.</p>
|
|||
<ul>
|
||||
<li><code>.detail</code> - Return the textual description of the error.</li>
|
||||
<li><code>.get_codes()</code> - Return the code identifier of the error.</li>
|
||||
<li><code>.full_details()</code> - Return both the textual description and the code identifier.</li>
|
||||
<li><code>.get_full_details()</code> - Return both the textual description and the code identifier.</li>
|
||||
</ul>
|
||||
<p>In most cases the error detail will be a simple item:</p>
|
||||
<pre><code>>>> print(exc.detail)
|
||||
You do not have permission to perform this action.
|
||||
>>> print(exc.get_codes())
|
||||
permission_denied
|
||||
>>> print(exc.full_details())
|
||||
>>> print(exc.get_full_details())
|
||||
{'message':'You do not have permission to perform this action.','code':'permission_denied'}
|
||||
</code></pre>
|
||||
<p>In the case of validation errors the error detail will be either a list or
|
||||
|
|
|
@ -438,6 +438,10 @@
|
|||
<a href="#drf-extensions">DRF-extensions</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#drf-proxy-pagination">drf-proxy-pagination</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<div class="promo">
|
||||
|
@ -700,6 +704,8 @@ which should return a list of <code>coreapi.Field</code> instances.</p>
|
|||
<p>The following third party packages are also available.</p>
|
||||
<h2 id="drf-extensions"><a class="toclink" href="#drf-extensions">DRF-extensions</a></h2>
|
||||
<p>The <a href="http://chibisov.github.io/drf-extensions/docs/"><code>DRF-extensions</code> package</a> includes a <a href="http://chibisov.github.io/drf-extensions/docs/#paginatebymaxmixin"><code>PaginateByMaxMixin</code> mixin class</a> that allows your API clients to specify <code>?page_size=max</code> to obtain the maximum allowed page size.</p>
|
||||
<h2 id="drf-proxy-pagination"><a class="toclink" href="#drf-proxy-pagination">drf-proxy-pagination</a></h2>
|
||||
<p>The <a href="https://github.com/tuffnatty/drf-proxy-pagination"><code>drf-proxy-pagination</code> package</a> includes a <code>ProxyPagination</code> class which allows to choose pagination class with a query parameter.</p>
|
||||
|
||||
|
||||
</div> <!--/span-->
|
||||
|
|
|
@ -527,7 +527,7 @@ AccountSerializer():
|
|||
artist = models.CharField(max_length=100)
|
||||
|
||||
class Track(models.Model):
|
||||
album = models.ForeignKey(Album, related_name='tracks')
|
||||
album = models.ForeignKey(Album, related_name='tracks', on_delete=models.CASCADE)
|
||||
order = models.IntegerField()
|
||||
title = models.CharField(max_length=100)
|
||||
duration = models.IntegerField()
|
||||
|
@ -888,7 +888,7 @@ class CustomerHyperlink(serializers.HyperlinkedRelatedField):
|
|||
</code></pre>
|
||||
<p>You'll normally want to ensure that you've set an appropriate <code>related_name</code> argument on the relationship, that you can use as the field name. For example:</p>
|
||||
<pre><code>class Track(models.Model):
|
||||
album = models.ForeignKey(Album, related_name='tracks')
|
||||
album = models.ForeignKey(Album, related_name='tracks', on_delete=models.CASCADE)
|
||||
...
|
||||
</code></pre>
|
||||
<p>If you have not set a related name for the reverse relationship, you'll need to use the automatically generated related name in the <code>fields</code> argument. For example:</p>
|
||||
|
@ -907,7 +907,7 @@ class CustomerHyperlink(serializers.HyperlinkedRelatedField):
|
|||
See: https://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/
|
||||
"""
|
||||
tag_name = models.SlugField()
|
||||
content_type = models.ForeignKey(ContentType)
|
||||
content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE)
|
||||
object_id = models.PositiveIntegerField()
|
||||
tagged_object = GenericForeignKey('content_type', 'object_id')
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
114
sitemap.xml
114
sitemap.xml
|
@ -4,7 +4,7 @@
|
|||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
|
@ -13,49 +13,49 @@
|
|||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//tutorial/quickstart/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//tutorial/1-serialization/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//tutorial/2-requests-and-responses/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//tutorial/3-class-based-views/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//tutorial/4-authentication-and-permissions/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//tutorial/5-relationships-and-hyperlinked-apis/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//tutorial/6-viewsets-and-routers/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//tutorial/7-schemas-and-client-libraries/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
|
@ -65,163 +65,163 @@
|
|||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/requests/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/responses/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/views/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/generic-views/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/viewsets/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/routers/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/parsers/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/renderers/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/serializers/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/fields/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/relations/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/validators/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/authentication/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/permissions/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/throttling/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/filtering/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/pagination/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/versioning/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/content-negotiation/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/metadata/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/schemas/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/format-suffixes/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/reverse/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/exceptions/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/status-codes/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/testing/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//api-guide/settings/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
|
@ -231,127 +231,127 @@
|
|||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/documenting-your-api/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/api-clients/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/internationalization/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/ajax-csrf-cors/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/html-and-forms/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/browser-enhancements/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/browsable-api/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/rest-hypermedia-hateoas/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/third-party-resources/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/contributing/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/project-management/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/3.0-announcement/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/3.1-announcement/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/3.2-announcement/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/3.3-announcement/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/3.4-announcement/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/3.5-announcement/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/kickstarter-announcement/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/mozilla-grant/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/funding/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
<url>
|
||||
<loc>http://www.django-rest-framework.org//topics/release-notes/</loc>
|
||||
<lastmod>2016-10-20</lastmod>
|
||||
<lastmod>2016-11-01</lastmod>
|
||||
<changefreq>daily</changefreq>
|
||||
</url>
|
||||
|
||||
|
|
|
@ -454,6 +454,27 @@
|
|||
</code></pre>
|
||||
<hr />
|
||||
<h2 id="35x-series"><a class="toclink" href="#35x-series">3.5.x series</a></h2>
|
||||
<h3 id="352"><a class="toclink" href="#352">3.5.2</a></h3>
|
||||
<p><strong>Date</strong>: <a href="https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.5.2+Release%22">1st November 2016</a></p>
|
||||
<ul>
|
||||
<li>Restore exception tracebacks in Python 2.7. (<a href="https://github.com/tomchristie/django-rest-framework/issues/4631">#4631</a>, <a href="https://github.com/tomchristie/django-rest-framework/issues/4638">#4638</a>)</li>
|
||||
<li>Properly display dicts in the admin console. (<a href="https://github.com/tomchristie/django-rest-framework/issues/4532">#4532</a>, <a href="https://github.com/tomchristie/django-rest-framework/issues/4636">#4636</a>)</li>
|
||||
<li>Fix is_simple_callable with variable args, kwargs. (<a href="https://github.com/tomchristie/django-rest-framework/issues/4622">#4622</a>, <a href="https://github.com/tomchristie/django-rest-framework/issues/4602">#4602</a>)</li>
|
||||
<li>Support 'on'/'off' literals with BooleanField. (<a href="https://github.com/tomchristie/django-rest-framework/issues/4640">#4640</a>, <a href="https://github.com/tomchristie/django-rest-framework/issues/4624">#4624</a>)</li>
|
||||
<li>Enable cursor pagination of value querysets. (<a href="https://github.com/tomchristie/django-rest-framework/issues/4569">#4569</a>)</li>
|
||||
<li>Fix support of get_full_details() for Throttled exceptions. (<a href="https://github.com/tomchristie/django-rest-framework/issues/4627">#4627</a>)</li>
|
||||
<li>Fix FilterSet proxy. (<a href="https://github.com/tomchristie/django-rest-framework/issues/4620">#4620</a>)</li>
|
||||
<li>Make serializer fields import explicit. (<a href="https://github.com/tomchristie/django-rest-framework/issues/4628">#4628</a>)</li>
|
||||
<li>Drop redundant requests adapter. (<a href="https://github.com/tomchristie/django-rest-framework/issues/4639">#4639</a>)</li>
|
||||
</ul>
|
||||
<h3 id="351"><a class="toclink" href="#351">3.5.1</a></h3>
|
||||
<p><strong>Date</strong>: <a href="https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.5.1+Release%22">21st October 2016</a></p>
|
||||
<ul>
|
||||
<li>Make <code>rest_framework/compat.py</code> imports. (<a href="https://github.com/tomchristie/django-rest-framework/issues/4612">#4612</a>, <a href="https://github.com/tomchristie/django-rest-framework/issues/4608">#4608</a>, <a href="https://github.com/tomchristie/django-rest-framework/issues/4601">#4601</a>)</li>
|
||||
<li>Fix bug in schema base path generation. (<a href="https://github.com/tomchristie/django-rest-framework/issues/4611">#4611</a>, <a href="https://github.com/tomchristie/django-rest-framework/issues/4605">#4605</a>)</li>
|
||||
<li>Fix broken case of ListSerializer with single item. (<a href="https://github.com/tomchristie/django-rest-framework/issues/4609">#4609</a>, <a href="https://github.com/tomchristie/django-rest-framework/issues/4606">#4606</a>)</li>
|
||||
<li>Remove bare <code>raise</code> for Python 3.5 compat. (<a href="https://github.com/tomchristie/django-rest-framework/issues/4600">#4600</a>)</li>
|
||||
</ul>
|
||||
<h3 id="350"><a class="toclink" href="#350">3.5.0</a></h3>
|
||||
<p><strong>Date</strong>: <a href="https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.5.0+Release%22">20th October 2016</a></p>
|
||||
<hr />
|
||||
|
@ -975,6 +996,10 @@
|
|||
<!-- 3.4.6 -->
|
||||
|
||||
<!-- 3.4.7 -->
|
||||
|
||||
<!-- 3.5.1 -->
|
||||
|
||||
<!-- 3.5.2 -->
|
||||
|
||||
|
||||
</div> <!--/span-->
|
||||
|
|
|
@ -433,7 +433,7 @@
|
|||
<p>We're going to make a couple of changes to our <code>Snippet</code> model class.
|
||||
First, let's add a couple of fields. One of those fields will be used to represent the user who created the code snippet. The other field will be used to store the highlighted HTML representation of the code.</p>
|
||||
<p>Add the following two fields to the <code>Snippet</code> model in <code>models.py</code>.</p>
|
||||
<pre><code>owner = models.ForeignKey('auth.User', related_name='snippets')
|
||||
<pre><code>owner = models.ForeignKey('auth.User', related_name='snippets', on_delete=models.CASCADE)
|
||||
highlighted = models.TextField()
|
||||
</code></pre>
|
||||
<p>We'd also need to make sure that when the model is saved, that we populate the highlighted field, using the <code>pygments</code> code highlighting library.</p>
|
||||
|
|
|
@ -449,10 +449,10 @@ representation become available as an option.</p>
|
|||
<p><img alt="Schema format" src="../../img/corejson-format.png" /></p>
|
||||
<p>We can also request the schema from the command line, by specifying the desired
|
||||
content type in the <code>Accept</code> header.</p>
|
||||
<pre><code>$ http http://127.0.0.1:8000/schema/ Accept:application/vnd.coreapi+json
|
||||
<pre><code>$ http http://127.0.0.1:8000/schema/ Accept:application/coreapi+json
|
||||
HTTP/1.0 200 OK
|
||||
Allow: GET, HEAD, OPTIONS
|
||||
Content-Type: application/vnd.coreapi+json
|
||||
Content-Type: application/coreapi+json
|
||||
|
||||
{
|
||||
"_meta": {
|
||||
|
|
Loading…
Reference in New Issue
Block a user