mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Deployed 5f386f58
with MkDocs version: 0.16.2
This commit is contained in:
parent
29434bb9f6
commit
296895fcae
2
404.html
2
404.html
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/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 disabled" rel="prev" >
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../permissions/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../permissions/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -476,6 +476,10 @@
|
||||||
<a href="#django-rest-knox">django-rest-knox</a>
|
<a href="#django-rest-knox">django-rest-knox</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="#drfpasswordless">drfpasswordless</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="promo">
|
<div class="promo">
|
||||||
|
@ -491,7 +495,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/authentication.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/authentication.py">
|
||||||
<span class="label label-info">authentication.py</span>
|
<span class="label label-info">authentication.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@ -746,6 +750,8 @@ REST_FRAMEWORK = {
|
||||||
<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>
|
<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>
|
||||||
<h2 id="django-rest-knox"><a class="toclink" href="#django-rest-knox">django-rest-knox</a></h2>
|
<h2 id="django-rest-knox"><a class="toclink" href="#django-rest-knox">django-rest-knox</a></h2>
|
||||||
<p><a href="https://github.com/James1345/django-rest-knox">Django-rest-knox</a> library provides models and views to handle token based authentication in a more secure and extensible way than the built-in TokenAuthentication scheme - with Single Page Applications and Mobile clients in mind. It provides per-client tokens, and views to generate them when provided some other authentication (usually basic authentication), to delete the token (providing a server enforced logout) and to delete all tokens (logs out all clients that a user is logged into).</p>
|
<p><a href="https://github.com/James1345/django-rest-knox">Django-rest-knox</a> library provides models and views to handle token based authentication in a more secure and extensible way than the built-in TokenAuthentication scheme - with Single Page Applications and Mobile clients in mind. It provides per-client tokens, and views to generate them when provided some other authentication (usually basic authentication), to delete the token (providing a server enforced logout) and to delete all tokens (logs out all clients that a user is logged into).</p>
|
||||||
|
<h2 id="drfpasswordless"><a class="toclink" href="#drfpasswordless">drfpasswordless</a></h2>
|
||||||
|
<p><a href="https://github.com/aaronn/django-rest-framework-passwordless">drfpasswordless</a> adds (Medium, Square Cash inspired) passwordless support to Django REST Framework's own TokenAuthentication scheme. Users log in and sign up with a token sent to a contact point like an email address or a mobile number.</p>
|
||||||
|
|
||||||
|
|
||||||
</div> <!--/span-->
|
</div> <!--/span-->
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../metadata/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../metadata/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -415,7 +415,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/negotiation.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/negotiation.py">
|
||||||
<span class="label label-info">negotiation.py</span>
|
<span class="label label-info">negotiation.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../status-codes/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../status-codes/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -455,7 +455,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/exceptions.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/exceptions.py">
|
||||||
<span class="label label-info">exceptions.py</span>
|
<span class="label label-info">exceptions.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../relations/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../relations/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -601,7 +601,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/fields.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/fields.py">
|
||||||
<span class="label label-info">fields.py</span>
|
<span class="label label-info">fields.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../pagination/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../pagination/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -489,7 +489,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/filters.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/filters.py">
|
||||||
<span class="label label-info">filters.py</span>
|
<span class="label label-info">filters.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@ -604,7 +604,7 @@ class UserListView(generics.ListAPIView):
|
||||||
<h2 id="djangofilterbackend"><a class="toclink" href="#djangofilterbackend">DjangoFilterBackend</a></h2>
|
<h2 id="djangofilterbackend"><a class="toclink" href="#djangofilterbackend">DjangoFilterBackend</a></h2>
|
||||||
<p>The <code>django-filter</code> library includes a <code>DjangoFilterBackend</code> class which
|
<p>The <code>django-filter</code> library includes a <code>DjangoFilterBackend</code> class which
|
||||||
supports highly customizable field filtering for REST framework.</p>
|
supports highly customizable field filtering for REST framework.</p>
|
||||||
<p>To use <code>DjangoFilterBackend</code>, first install <code>django-filter</code>.</p>
|
<p>To use <code>DjangoFilterBackend</code>, first install <code>django-filter</code>. Then add <code>django_filters</code> to Django's <code>INSTALLED_APPS</code></p>
|
||||||
<pre><code>pip install django-filter
|
<pre><code>pip install django-filter
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>You should now either add the filter backend to your settings:</p>
|
<p>You should now either add the filter backend to your settings:</p>
|
||||||
|
@ -619,12 +619,6 @@ class UserListView(generics.ListAPIView):
|
||||||
...
|
...
|
||||||
filter_backends = (DjangoFilterBackend,)
|
filter_backends = (DjangoFilterBackend,)
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>If you are using the browsable API or admin API you may also want to install <code>django-crispy-forms</code>, which will enhance the presentation of the filter forms in HTML views, by allowing them to render Bootstrap 3 HTML.</p>
|
|
||||||
<pre><code>pip install django-crispy-forms
|
|
||||||
</code></pre>
|
|
||||||
<p>With crispy forms installed and added to Django's <code>INSTALLED_APPS</code>, the browsable API will present a filtering control for <code>DjangoFilterBackend</code>, like so:</p>
|
|
||||||
<p><img alt="Django Filter" src="../../img/django-filter.png" /></p>
|
|
||||||
<h4 id="specifying-filter-fields"><a class="toclink" href="#specifying-filter-fields">Specifying filter fields</a></h4>
|
|
||||||
<p>If all you need is simple equality-based filtering, you can set a <code>filter_fields</code> attribute on the view, or viewset, listing the set of fields you wish to filter against.</p>
|
<p>If all you need is simple equality-based filtering, you can set a <code>filter_fields</code> attribute on the view, or viewset, listing the set of fields you wish to filter against.</p>
|
||||||
<pre><code>class ProductList(generics.ListAPIView):
|
<pre><code>class ProductList(generics.ListAPIView):
|
||||||
queryset = Product.objects.all()
|
queryset = Product.objects.all()
|
||||||
|
@ -635,70 +629,9 @@ class UserListView(generics.ListAPIView):
|
||||||
<p>This will automatically create a <code>FilterSet</code> class for the given fields, and will allow you to make requests such as:</p>
|
<p>This will automatically create a <code>FilterSet</code> class for the given fields, and will allow you to make requests such as:</p>
|
||||||
<pre><code>http://example.com/api/products?category=clothing&in_stock=True
|
<pre><code>http://example.com/api/products?category=clothing&in_stock=True
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h4 id="specifying-a-filterset"><a class="toclink" href="#specifying-a-filterset">Specifying a FilterSet</a></h4>
|
<p>For more advanced filtering requirements you can specify a <code>FilterSet</code> class that should be used by the view.
|
||||||
<p>For more advanced filtering requirements you can specify a <code>FilterSet</code> class that should be used by the view. For example:</p>
|
You can read more about <code>FilterSet</code>s in the <a href="https://django-filter.readthedocs.io/en/latest/index.html">django-filter documentation</a>.
|
||||||
<pre><code>import django_filters
|
It's also recommended that you read the section on <a href="https://django-filter.readthedocs.io/en/develop/guide/rest_framework.html">DRF integration</a>.</p>
|
||||||
from myapp.models import Product
|
|
||||||
from myapp.serializers import ProductSerializer
|
|
||||||
from rest_framework import generics
|
|
||||||
|
|
||||||
class ProductFilter(django_filters.rest_framework.FilterSet):
|
|
||||||
min_price = django_filters.NumberFilter(name="price", lookup_expr='gte')
|
|
||||||
max_price = django_filters.NumberFilter(name="price", lookup_expr='lte')
|
|
||||||
class Meta:
|
|
||||||
model = Product
|
|
||||||
fields = ['category', 'in_stock', 'min_price', 'max_price']
|
|
||||||
|
|
||||||
class ProductList(generics.ListAPIView):
|
|
||||||
queryset = Product.objects.all()
|
|
||||||
serializer_class = ProductSerializer
|
|
||||||
filter_backends = (django_filters.rest_framework.DjangoFilterBackend,)
|
|
||||||
filter_class = ProductFilter
|
|
||||||
</code></pre>
|
|
||||||
<p>Which will allow you to make requests such as:</p>
|
|
||||||
<pre><code>http://example.com/api/products?category=clothing&max_price=10.00
|
|
||||||
</code></pre>
|
|
||||||
<p>You can also span relationships using <code>django-filter</code>, let's assume that each
|
|
||||||
product has foreign key to <code>Manufacturer</code> model, so we create filter that
|
|
||||||
filters using <code>Manufacturer</code> name. For example:</p>
|
|
||||||
<pre><code>import django_filters
|
|
||||||
from myapp.models import Product
|
|
||||||
from myapp.serializers import ProductSerializer
|
|
||||||
from rest_framework import generics
|
|
||||||
|
|
||||||
class ProductFilter(django_filters.rest_framework.FilterSet):
|
|
||||||
class Meta:
|
|
||||||
model = Product
|
|
||||||
fields = ['category', 'in_stock', 'manufacturer__name']
|
|
||||||
</code></pre>
|
|
||||||
<p>This enables us to make queries like:</p>
|
|
||||||
<pre><code>http://example.com/api/products?manufacturer__name=foo
|
|
||||||
</code></pre>
|
|
||||||
<p>This is nice, but it exposes the Django's double underscore convention as part of the API. If you instead want to explicitly name the filter argument you can instead explicitly include it on the <code>FilterSet</code> class:</p>
|
|
||||||
<pre><code>import django_filters
|
|
||||||
from myapp.models import Product
|
|
||||||
from myapp.serializers import ProductSerializer
|
|
||||||
from rest_framework import generics
|
|
||||||
|
|
||||||
class ProductFilter(django_filters.rest_framework.FilterSet):
|
|
||||||
manufacturer = django_filters.CharFilter(name="manufacturer__name")
|
|
||||||
|
|
||||||
class Meta:
|
|
||||||
model = Product
|
|
||||||
fields = ['category', 'in_stock', 'manufacturer']
|
|
||||||
</code></pre>
|
|
||||||
<p>And now you can execute:</p>
|
|
||||||
<pre><code>http://example.com/api/products?manufacturer=foo
|
|
||||||
</code></pre>
|
|
||||||
<p>For more details on using filter sets see the <a href="https://django-filter.readthedocs.io/en/latest/index.html">django-filter documentation</a>.</p>
|
|
||||||
<hr />
|
|
||||||
<p><strong>Hints & Tips</strong></p>
|
|
||||||
<ul>
|
|
||||||
<li>By default filtering is not enabled. If you want to use <code>DjangoFilterBackend</code> remember to make sure it is installed by using the <code>'DEFAULT_FILTER_BACKENDS'</code> setting.</li>
|
|
||||||
<li>When using boolean fields, you should use the values <code>True</code> and <code>False</code> in the URL query parameters, rather than <code>0</code>, <code>1</code>, <code>true</code> or <code>false</code>. (The allowed boolean values are currently hardwired in Django's <a href="https://github.com/django/django/blob/master/django/forms/widgets.py">NullBooleanSelect implementation</a>.)</li>
|
|
||||||
<li><code>django-filter</code> supports filtering across relationships, using Django's double-underscore syntax.</li>
|
|
||||||
</ul>
|
|
||||||
<hr />
|
|
||||||
<h2 id="searchfilter"><a class="toclink" href="#searchfilter">SearchFilter</a></h2>
|
<h2 id="searchfilter"><a class="toclink" href="#searchfilter">SearchFilter</a></h2>
|
||||||
<p>The <code>SearchFilter</code> class supports simple single query parameter based searching, and is based on the <a href="https://docs.djangoproject.com/en/stable/ref/contrib/admin/#django.contrib.admin.ModelAdmin.search_fields">Django admin's search functionality</a>.</p>
|
<p>The <code>SearchFilter</code> class supports simple single query parameter based searching, and is based on the <a href="https://docs.djangoproject.com/en/stable/ref/contrib/admin/#django.contrib.admin.ModelAdmin.search_fields">Django admin's search functionality</a>.</p>
|
||||||
<p>When in use, the browsable API will include a <code>SearchFilter</code> control:</p>
|
<p>When in use, the browsable API will include a <code>SearchFilter</code> control:</p>
|
||||||
|
@ -825,8 +758,9 @@ class ProductFilter(django_filters.rest_framework.FilterSet):
|
||||||
<p>The method should return a rendered HTML string.</p>
|
<p>The method should return a rendered HTML string.</p>
|
||||||
<h2 id="pagination-schemas"><a class="toclink" href="#pagination-schemas">Pagination & schemas</a></h2>
|
<h2 id="pagination-schemas"><a class="toclink" href="#pagination-schemas">Pagination & schemas</a></h2>
|
||||||
<p>You can also make the filter controls available to the schema autogeneration
|
<p>You can also make the filter controls available to the schema autogeneration
|
||||||
that REST framework provides, by implementing a <code>get_schema_fields()</code> method,
|
that REST framework provides, by implementing a <code>get_schema_fields()</code> method. This method should have the following signature:</p>
|
||||||
which should return a list of <code>coreapi.Field</code> instances.</p>
|
<p><code>get_schema_fields(self, view)</code></p>
|
||||||
|
<p>The method should return a list of <code>coreapi.Field</code> instances.</p>
|
||||||
<h1 id="third-party-packages"><a class="toclink" href="#third-party-packages">Third party packages</a></h1>
|
<h1 id="third-party-packages"><a class="toclink" href="#third-party-packages">Third party packages</a></h1>
|
||||||
<p>The following third party packages provide additional filter implementations.</p>
|
<p>The following third party packages provide additional filter implementations.</p>
|
||||||
<h2 id="django-rest-framework-filters-package"><a class="toclink" href="#django-rest-framework-filters-package">Django REST framework filters package</a></h2>
|
<h2 id="django-rest-framework-filters-package"><a class="toclink" href="#django-rest-framework-filters-package">Django REST framework filters package</a></h2>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../reverse/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../reverse/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -409,7 +409,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/urlpatterns.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/urlpatterns.py">
|
||||||
<span class="label label-info">urlpatterns.py</span>
|
<span class="label label-info">urlpatterns.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../viewsets/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../viewsets/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -513,11 +513,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/mixins.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/mixins.py">
|
||||||
<span class="label label-info">mixins.py</span>
|
<span class="label label-info">mixins.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/generics.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/generics.py">
|
||||||
<span class="label label-info">generics.py</span>
|
<span class="label label-info">generics.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../schemas/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../schemas/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -425,7 +425,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/metadata.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/metadata.py">
|
||||||
<span class="label label-info">metadata.py</span>
|
<span class="label label-info">metadata.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../versioning/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../versioning/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -469,7 +469,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/pagination.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/pagination.py">
|
||||||
<span class="label label-info">pagination.py</span>
|
<span class="label label-info">pagination.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@ -692,8 +692,9 @@ class StandardResultsSetPagination(PageNumberPagination):
|
||||||
<p>API responses for list endpoints will now include a <code>Link</code> header, instead of including the pagination links as part of the body of the response, for example:</p>
|
<p>API responses for list endpoints will now include a <code>Link</code> header, instead of including the pagination links as part of the body of the response, for example:</p>
|
||||||
<h2 id="pagination-schemas"><a class="toclink" href="#pagination-schemas">Pagination & schemas</a></h2>
|
<h2 id="pagination-schemas"><a class="toclink" href="#pagination-schemas">Pagination & schemas</a></h2>
|
||||||
<p>You can also make the pagination controls available to the schema autogeneration
|
<p>You can also make the pagination controls available to the schema autogeneration
|
||||||
that REST framework provides, by implementing a <code>get_schema_fields()</code> method,
|
that REST framework provides, by implementing a <code>get_schema_fields()</code> method. This method should have the following signature:</p>
|
||||||
which should return a list of <code>coreapi.Field</code> instances.</p>
|
<p><code>get_schema_fields(self, view)</code></p>
|
||||||
|
<p>The method should return a list of <code>coreapi.Field</code> instances.</p>
|
||||||
<hr />
|
<hr />
|
||||||
<p><img alt="Link Header" src="../../img/link-header-pagination.png" /></p>
|
<p><img alt="Link Header" src="../../img/link-header-pagination.png" /></p>
|
||||||
<p><em>A custom pagination style, using the 'Link' header'</em></p>
|
<p><em>A custom pagination style, using the 'Link' header'</em></p>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../renderers/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../renderers/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -471,7 +471,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/parsers.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/parsers.py">
|
||||||
<span class="label label-info">parsers.py</span>
|
<span class="label label-info">parsers.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../throttling/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../throttling/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -479,7 +479,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/permissions.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/permissions.py">
|
||||||
<span class="label label-info">permissions.py</span>
|
<span class="label label-info">permissions.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../validators/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../validators/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -505,7 +505,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/relations.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/relations.py">
|
||||||
<span class="label label-info">relations.py</span>
|
<span class="label label-info">relations.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../serializers/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../serializers/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -533,7 +533,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/renderers.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/renderers.py">
|
||||||
<span class="label label-info">renderers.py</span>
|
<span class="label label-info">renderers.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../responses/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../responses/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -471,7 +471,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/request.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/request.py">
|
||||||
<span class="label label-info">request.py</span>
|
<span class="label label-info">request.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../views/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../views/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -451,7 +451,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/response.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/response.py">
|
||||||
<span class="label label-info">response.py</span>
|
<span class="label label-info">response.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../exceptions/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../exceptions/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -405,7 +405,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/reverse.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/reverse.py">
|
||||||
<span class="label label-info">reverse.py</span>
|
<span class="label label-info">reverse.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../parsers/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../parsers/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -451,7 +451,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/routers.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/routers.py">
|
||||||
<span class="label label-info">routers.py</span>
|
<span class="label label-info">routers.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@ -678,7 +678,7 @@ class CustomReadOnlyRouter(SimpleRouter):
|
||||||
lookup_field = 'username'
|
lookup_field = 'username'
|
||||||
|
|
||||||
@detail_route()
|
@detail_route()
|
||||||
def group_names(self, request):
|
def group_names(self, request, pk=None):
|
||||||
"""
|
"""
|
||||||
Returns a list of all the group names that the given
|
Returns a list of all the group names that the given
|
||||||
user belongs to.
|
user belongs to.
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../format-suffixes/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../format-suffixes/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -465,7 +465,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/schemas.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/schemas.py">
|
||||||
<span class="label label-info">schemas.py</span>
|
<span class="label label-info">schemas.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@ -566,7 +566,7 @@ urlpatterns = [
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Once the view has been added, you'll be able to make API requests to retrieve
|
<p>Once the view has been added, you'll be able to make API requests to retrieve
|
||||||
the auto-generated schema definition.</p>
|
the auto-generated schema definition.</p>
|
||||||
<pre><code>$ http http://127.0.0.1:8000/ Accept:application/vnd.coreapi+json
|
<pre><code>$ http http://127.0.0.1:8000/ Accept:application/coreapi+json
|
||||||
HTTP/1.0 200 OK
|
HTTP/1.0 200 OK
|
||||||
Allow: GET, HEAD, OPTIONS
|
Allow: GET, HEAD, OPTIONS
|
||||||
Content-Type: application/vnd.coreapi+json
|
Content-Type: application/vnd.coreapi+json
|
||||||
|
@ -610,6 +610,19 @@ schema_view = get_schema_view(
|
||||||
renderer_classes=[CoreJSONRenderer, APIBlueprintRenderer]
|
renderer_classes=[CoreJSONRenderer, APIBlueprintRenderer]
|
||||||
)
|
)
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
<h4 id="patterns"><a class="toclink" href="#patterns"><code>patterns</code></a></h4>
|
||||||
|
<p>List of url patterns to limit the schema introspection to. If you only want the <code>myproject.api</code> urls
|
||||||
|
to be exposed in the schema:</p>
|
||||||
|
<pre><code>schema_url_patterns = [
|
||||||
|
url(r'^api/', include('myproject.api.urls')),
|
||||||
|
]
|
||||||
|
|
||||||
|
schema_view = get_schema_view(
|
||||||
|
title='Server Monitoring API',
|
||||||
|
url='https://www.example.org/api/',
|
||||||
|
patterns=schema_url_patterns,
|
||||||
|
)
|
||||||
|
</code></pre>
|
||||||
<h2 id="using-an-explicit-schema-view"><a class="toclink" href="#using-an-explicit-schema-view">Using an explicit schema view</a></h2>
|
<h2 id="using-an-explicit-schema-view"><a class="toclink" href="#using-an-explicit-schema-view">Using an explicit schema view</a></h2>
|
||||||
<p>If you need a little more control than the <code>get_schema_view()</code> shortcut gives you,
|
<p>If you need a little more control than the <code>get_schema_view()</code> shortcut gives you,
|
||||||
then you can use the <code>SchemaGenerator</code> class directly to auto-generate the
|
then you can use the <code>SchemaGenerator</code> class directly to auto-generate the
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../fields/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../fields/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -609,7 +609,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/serializers.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/serializers.py">
|
||||||
<span class="label label-info">serializers.py</span>
|
<span class="label label-info">serializers.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../../topics/documenting-your-api/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../../topics/documenting-your-api/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -455,7 +455,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/settings.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/settings.py">
|
||||||
<span class="label label-info">settings.py</span>
|
<span class="label label-info">settings.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../testing/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../testing/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -421,7 +421,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/status.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/status.py">
|
||||||
<span class="label label-info">status.py</span>
|
<span class="label label-info">status.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../settings/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../settings/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -503,7 +503,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/test.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/test.py">
|
||||||
<span class="label label-info">test.py</span>
|
<span class="label label-info">test.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
@ -626,7 +626,7 @@ client.credentials()
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>The <code>credentials</code> method is appropriate for testing APIs that require authentication headers, such as basic authentication, OAuth1a and OAuth2 authentication, and simple token authentication schemes.</p>
|
<p>The <code>credentials</code> method is appropriate for testing APIs that require authentication headers, such as basic authentication, OAuth1a and OAuth2 authentication, and simple token authentication schemes.</p>
|
||||||
<h4 id="force_authenticateusernone-tokennone"><a class="toclink" href="#force_authenticateusernone-tokennone">.force_authenticate(user=None, token=None)</a></h4>
|
<h4 id="force_authenticateusernone-tokennone"><a class="toclink" href="#force_authenticateusernone-tokennone">.force_authenticate(user=None, token=None)</a></h4>
|
||||||
<p>Sometimes you may want to bypass authentication, and simple force all requests by the test client to be automatically treated as authenticated.</p>
|
<p>Sometimes you may want to bypass authentication entirely and force all requests by the test client to be automatically treated as authenticated.</p>
|
||||||
<p>This can be a useful shortcut if you're testing the API but don't want to have to construct valid authentication credentials in order to make test requests.</p>
|
<p>This can be a useful shortcut if you're testing the API but don't want to have to construct valid authentication credentials in order to make test requests.</p>
|
||||||
<pre><code>user = User.objects.get(username='lauren')
|
<pre><code>user = User.objects.get(username='lauren')
|
||||||
client = APIClient()
|
client = APIClient()
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../filtering/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../filtering/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -441,7 +441,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/throttling.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/throttling.py">
|
||||||
<span class="label label-info">throttling.py</span>
|
<span class="label label-info">throttling.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../authentication/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../authentication/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -467,7 +467,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/validators.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/validators.py">
|
||||||
<span class="label label-info">validators.py</span>
|
<span class="label label-info">validators.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../content-negotiation/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../content-negotiation/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -441,7 +441,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/versioning.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/versioning.py">
|
||||||
<span class="label label-info">versioning.py</span>
|
<span class="label label-info">versioning.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../generic-views/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../generic-views/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -427,11 +427,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/decorators.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/decorators.py">
|
||||||
<span class="label label-info">decorators.py</span>
|
<span class="label label-info">decorators.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/views.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/views.py">
|
||||||
<span class="label label-info">views.py</span>
|
<span class="label label-info">views.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../routers/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../routers/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -437,7 +437,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a class="github" href="https://github.com/tomchristie/django-rest-framework/tree/master/rest_framework/viewsets.py">
|
<a class="github" href="https://github.com/encode/django-rest-framework/tree/master/rest_framework/viewsets.py">
|
||||||
<span class="label label-info">viewsets.py</span>
|
<span class="label label-info">viewsets.py</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
|
@ -417,3 +417,8 @@ ul.sponsor {
|
||||||
.toclink {
|
.toclink {
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.book-cover img {
|
||||||
|
margin: 0 !important;
|
||||||
|
display: inline-block !important;
|
||||||
|
}
|
||||||
|
|
BIN
img/books/hwa-cover.png
Normal file
BIN
img/books/hwa-cover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
BIN
img/books/tsd-cover.png
Normal file
BIN
img/books/tsd-cover.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 116 KiB |
Binary file not shown.
Before Width: | Height: | Size: 13 KiB |
16
index.html
16
index.html
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="tutorial/quickstart/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="tutorial/quickstart/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -487,10 +487,10 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<p class="badges" height=20px>
|
<p class="badges" height=20px>
|
||||||
<iframe src="http://ghbtns.com/github-btn.html?user=tomchristie&repo=django-rest-framework&type=watch&count=true" class="github-star-button" allowtransparency="true" frameborder="0" scrolling="0" width="110px" height="20px"></iframe>
|
<iframe src="http://ghbtns.com/github-btn.html?user=encode&repo=django-rest-framework&type=watch&count=true" class="github-star-button" allowtransparency="true" frameborder="0" scrolling="0" width="110px" height="20px"></iframe>
|
||||||
|
|
||||||
<a href="http://travis-ci.org/tomchristie/django-rest-framework?branch=master">
|
<a href="http://travis-ci.org/encode/django-rest-framework?branch=master">
|
||||||
<img src="https://secure.travis-ci.org/tomchristie/django-rest-framework.svg?branch=master" class="status-badge">
|
<img src="https://secure.travis-ci.org/encode/django-rest-framework.svg?branch=master" class="status-badge">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a href="https://pypi.python.org/pypi/djangorestframework">
|
<a href="https://pypi.python.org/pypi/djangorestframework">
|
||||||
|
@ -546,8 +546,8 @@ continued development by <strong><a href="topics/funding/">signing up for a paid
|
||||||
<h2 id="requirements"><a class="toclink" href="#requirements">Requirements</a></h2>
|
<h2 id="requirements"><a class="toclink" href="#requirements">Requirements</a></h2>
|
||||||
<p>REST framework requires the following:</p>
|
<p>REST framework requires the following:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Python (2.7, 3.2, 3.3, 3.4, 3.5)</li>
|
<li>Python (2.7, 3.2, 3.3, 3.4, 3.5, 3.6)</li>
|
||||||
<li>Django (1.8, 1.9, 1.10)</li>
|
<li>Django (1.8, 1.9, 1.10, 1.11)</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>The following packages are optional:</p>
|
<p>The following packages are optional:</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -555,7 +555,7 @@ continued development by <strong><a href="topics/funding/">signing up for a paid
|
||||||
<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> (1.0.1+) - 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/django-guardian/django-guardian">django-guardian</a> (1.1.1+) - Object level permissions support.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="installation"><a class="toclink" href="#installation">Installation</a></h2>
|
<h2 id="installation"><a class="toclink" href="#installation">Installation</a></h2>
|
||||||
<p>Install using <code>pip</code>, including any optional packages you want...</p>
|
<p>Install using <code>pip</code>, including any optional packages you want...</p>
|
||||||
|
@ -564,7 +564,7 @@ pip install markdown # Markdown support for the browsable API.
|
||||||
pip install django-filter # Filtering support
|
pip install django-filter # Filtering support
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>...or clone the project from github.</p>
|
<p>...or clone the project from github.</p>
|
||||||
<pre><code>git clone git@github.com:tomchristie/django-rest-framework.git
|
<pre><code>git clone git@github.com:encode/django-rest-framework.git
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Add <code>'rest_framework'</code> to your <code>INSTALLED_APPS</code> setting.</p>
|
<p>Add <code>'rest_framework'</code> to your <code>INSTALLED_APPS</code> setting.</p>
|
||||||
<pre><code>INSTALLED_APPS = (
|
<pre><code>INSTALLED_APPS = (
|
||||||
|
|
File diff suppressed because one or more lines are too long
120
sitemap.xml
120
sitemap.xml
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>http://www.django-rest-framework.org//</loc>
|
<loc>http://www.django-rest-framework.org//</loc>
|
||||||
<lastmod>2017-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
|
@ -231,145 +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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</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-03-27</lastmod>
|
<lastmod>2017-05-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>http://www.django-rest-framework.org//topics/3.0-announcement/</loc>
|
<loc>http://www.django-rest-framework.org//topics/3.0-announcement/</loc>
|
||||||
<lastmod>2017-03-27</lastmod>
|
<lastmod>2017-05-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>http://www.django-rest-framework.org//topics/3.1-announcement/</loc>
|
<loc>http://www.django-rest-framework.org//topics/3.1-announcement/</loc>
|
||||||
<lastmod>2017-03-27</lastmod>
|
<lastmod>2017-05-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>http://www.django-rest-framework.org//topics/3.2-announcement/</loc>
|
<loc>http://www.django-rest-framework.org//topics/3.2-announcement/</loc>
|
||||||
<lastmod>2017-03-27</lastmod>
|
<lastmod>2017-05-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>http://www.django-rest-framework.org//topics/3.3-announcement/</loc>
|
<loc>http://www.django-rest-framework.org//topics/3.3-announcement/</loc>
|
||||||
<lastmod>2017-03-27</lastmod>
|
<lastmod>2017-05-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>http://www.django-rest-framework.org//topics/3.4-announcement/</loc>
|
<loc>http://www.django-rest-framework.org//topics/3.4-announcement/</loc>
|
||||||
<lastmod>2017-03-27</lastmod>
|
<lastmod>2017-05-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>http://www.django-rest-framework.org//topics/3.5-announcement/</loc>
|
<loc>http://www.django-rest-framework.org//topics/3.5-announcement/</loc>
|
||||||
<lastmod>2017-03-27</lastmod>
|
<lastmod>2017-05-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>http://www.django-rest-framework.org//topics/3.6-announcement/</loc>
|
<loc>http://www.django-rest-framework.org//topics/3.6-announcement/</loc>
|
||||||
<lastmod>2017-03-27</lastmod>
|
<lastmod>2017-05-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>http://www.django-rest-framework.org//topics/kickstarter-announcement/</loc>
|
<loc>http://www.django-rest-framework.org//topics/kickstarter-announcement/</loc>
|
||||||
<lastmod>2017-03-27</lastmod>
|
<lastmod>2017-05-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>http://www.django-rest-framework.org//topics/mozilla-grant/</loc>
|
<loc>http://www.django-rest-framework.org//topics/mozilla-grant/</loc>
|
||||||
<lastmod>2017-03-27</lastmod>
|
<lastmod>2017-05-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>http://www.django-rest-framework.org//topics/funding/</loc>
|
<loc>http://www.django-rest-framework.org//topics/funding/</loc>
|
||||||
<lastmod>2017-03-27</lastmod>
|
<lastmod>2017-05-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>http://www.django-rest-framework.org//topics/release-notes/</loc>
|
<loc>http://www.django-rest-framework.org//topics/release-notes/</loc>
|
||||||
<lastmod>2017-03-27</lastmod>
|
<lastmod>2017-05-12</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<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>
|
||||||
|
@ -451,7 +451,7 @@
|
||||||
<li>Simple model serializers that are vastly easier to understand and debug, and that make it easy to switch between the implicit <code>ModelSerializer</code> class and the explicit <code>Serializer</code> class.</li>
|
<li>Simple model serializers that are vastly easier to understand and debug, and that make it easy to switch between the implicit <code>ModelSerializer</code> class and the explicit <code>Serializer</code> class.</li>
|
||||||
<li>A new <code>BaseSerializer</code> class, making it easier to write serializers for alternative storage backends, or to completely customize your serialization and validation logic.</li>
|
<li>A new <code>BaseSerializer</code> class, making it easier to write serializers for alternative storage backends, or to completely customize your serialization and validation logic.</li>
|
||||||
<li>A cleaner fields API including new classes such as <code>ListField</code> and <code>MultipleChoiceField</code>.</li>
|
<li>A cleaner fields API including new classes such as <code>ListField</code> and <code>MultipleChoiceField</code>.</li>
|
||||||
<li><a href="https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/mixins.py">Super simple default implementations</a> for the generic views.</li>
|
<li><a href="https://github.com/encode/django-rest-framework/blob/master/rest_framework/mixins.py">Super simple default implementations</a> for the generic views.</li>
|
||||||
<li>Support for overriding how validation errors are handled by your API.</li>
|
<li>Support for overriding how validation errors are handled by your API.</li>
|
||||||
<li>A metadata API that allows you to customize how <code>OPTIONS</code> requests are handled by your API.</li>
|
<li>A metadata API that allows you to customize how <code>OPTIONS</code> requests are handled by your API.</li>
|
||||||
<li>A more compact JSON output with unicode style encoding turned on by default.</li>
|
<li>A more compact JSON output with unicode style encoding turned on by default.</li>
|
||||||
|
@ -1176,7 +1176,7 @@ amount = serializers.DecimalField(
|
||||||
<li>Better support for API versioning.</li>
|
<li>Better support for API versioning.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>The 3.2 release is planned to introduce an alternative admin-style interface to the browsable API.</p>
|
<p>The 3.2 release is planned to introduce an alternative admin-style interface to the browsable API.</p>
|
||||||
<p>You can follow development on the GitHub site, where we use <a href="https://github.com/tomchristie/django-rest-framework/milestones">milestones to indicate planning timescales</a>.</p>
|
<p>You can follow development on the GitHub site, where we use <a href="https://github.com/encode/django-rest-framework/milestones">milestones to indicate planning timescales</a>.</p>
|
||||||
|
|
||||||
|
|
||||||
</div> <!--/span-->
|
</div> <!--/span-->
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3.2-announcement/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3.2-announcement/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3.3-announcement/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3.3-announcement/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -422,7 +422,7 @@
|
||||||
<p><img alt="The AdminRenderer" src="../../img/admin.png" /></p>
|
<p><img alt="The AdminRenderer" src="../../img/admin.png" /></p>
|
||||||
<p>This interface is intended to act as a more user-friendly interface to the API. It can be used either as a replacement to the existing <code>BrowsableAPIRenderer</code>, or used together with it, allowing you to switch between the two styles as required.</p>
|
<p>This interface is intended to act as a more user-friendly interface to the API. It can be used either as a replacement to the existing <code>BrowsableAPIRenderer</code>, or used together with it, allowing you to switch between the two styles as required.</p>
|
||||||
<p>We've also fixed a huge number of issues, and made numerous cleanups and improvements.</p>
|
<p>We've also fixed a huge number of issues, and made numerous cleanups and improvements.</p>
|
||||||
<p>Over the course of the 3.1.x series we've <a href="https://github.com/tomchristie/django-rest-framework/issues?utf8=%E2%9C%93&q=closed%3A%3E2015-03-05">resolved nearly 600 tickets</a> on our GitHub issue tracker. This means we're currently running at a rate of <strong>closing around 100 issues or pull requests per month</strong>.</p>
|
<p>Over the course of the 3.1.x series we've <a href="https://github.com/encode/django-rest-framework/issues?utf8=%E2%9C%93&q=closed%3A%3E2015-03-05">resolved nearly 600 tickets</a> on our GitHub issue tracker. This means we're currently running at a rate of <strong>closing around 100 issues or pull requests per month</strong>.</p>
|
||||||
<p>None of this would have been possible without the support of our wonderful Kickstarter backers. If you're looking for a job in Django development we'd strongly recommend taking <a href="http://www.django-rest-framework.org/topics/kickstarter-announcement/#sponsors">a look through our sponsors</a> and finding out who's hiring.</p>
|
<p>None of this would have been possible without the support of our wonderful Kickstarter backers. If you're looking for a job in Django development we'd strongly recommend taking <a href="http://www.django-rest-framework.org/topics/kickstarter-announcement/#sponsors">a look through our sponsors</a> and finding out who's hiring.</p>
|
||||||
<h2 id="adminrenderer"><a class="toclink" href="#adminrenderer">AdminRenderer</a></h2>
|
<h2 id="adminrenderer"><a class="toclink" href="#adminrenderer">AdminRenderer</a></h2>
|
||||||
<p>To include <code>AdminRenderer</code> simply add it to your settings:</p>
|
<p>To include <code>AdminRenderer</code> simply add it to your settings:</p>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3.4-announcement/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3.4-announcement/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -422,7 +422,7 @@
|
||||||
<li>A <a href="../html-and-forms/">forms API</a>, allowing serializers to be rendered as HTML forms.</li>
|
<li>A <a href="../html-and-forms/">forms API</a>, allowing serializers to be rendered as HTML forms.</li>
|
||||||
<li>Django 1.9 support.</li>
|
<li>Django 1.9 support.</li>
|
||||||
<li>A <a href="../../../api-guide/fields#jsonfield"><code>JSONField</code> serializer field</a>, corresponding to Django 1.9's Postgres <code>JSONField</code> model field.</li>
|
<li>A <a href="../../../api-guide/fields#jsonfield"><code>JSONField</code> serializer field</a>, corresponding to Django 1.9's Postgres <code>JSONField</code> model field.</li>
|
||||||
<li>Browsable API support <a href="https://github.com/tomchristie/ajax-form">via AJAX</a>, rather than server side request overloading.</li>
|
<li>Browsable API support <a href="https://github.com/encode/ajax-form">via AJAX</a>, rather than server side request overloading.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p><img alt="Filter Controls" src="../../img/filter-controls.png" /></p>
|
<p><img alt="Filter Controls" src="../../img/filter-controls.png" /></p>
|
||||||
<p><em>Example of the new filter controls</em></p>
|
<p><em>Example of the new filter controls</em></p>
|
||||||
|
@ -433,7 +433,7 @@
|
||||||
<h2 id="deprecations"><a class="toclink" href="#deprecations">Deprecations</a></h2>
|
<h2 id="deprecations"><a class="toclink" href="#deprecations">Deprecations</a></h2>
|
||||||
<p>The AJAX based support for the browsable API means that there are a number of internal cleanups in the <code>request</code> class. For the vast majority of developers this should largely remain transparent:</p>
|
<p>The AJAX based support for the browsable API means that there are a number of internal cleanups in the <code>request</code> class. For the vast majority of developers this should largely remain transparent:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>To support form based <code>PUT</code> and <code>DELETE</code>, or to support form content types such as JSON, you should now use the <a href="https://github.com/tomchristie/ajax-form">AJAX forms</a> javascript library. This replaces the previous 'method and content type overloading' that required significant internal complexity to the request class.</li>
|
<li>To support form based <code>PUT</code> and <code>DELETE</code>, or to support form content types such as JSON, you should now use the <a href="https://github.com/encode/ajax-form">AJAX forms</a> javascript library. This replaces the previous 'method and content type overloading' that required significant internal complexity to the request class.</li>
|
||||||
<li>The <code>accept</code> query parameter is no longer supported by the default content negotiation class. If you require it then you'll need to <a href="../browser-enhancements/#url-based-accept-headers">use a custom content negotiation class</a>.</li>
|
<li>The <code>accept</code> query parameter is no longer supported by the default content negotiation class. If you require it then you'll need to <a href="../browser-enhancements/#url-based-accept-headers">use a custom content negotiation class</a>.</li>
|
||||||
<li>The custom <code>HTTP_X_HTTP_METHOD_OVERRIDE</code> header is no longer supported by default. If you require it then you'll need to <a href="../browser-enhancements/#http-header-based-method-overriding">use custom middleware</a>.</li>
|
<li>The custom <code>HTTP_X_HTTP_METHOD_OVERRIDE</code> header is no longer supported by default. If you require it then you'll need to <a href="../browser-enhancements/#http-header-based-method-overriding">use custom middleware</a>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3.5-announcement/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3.5-announcement/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -566,10 +566,10 @@ to return a list of available instances to choose from for that relational field
|
||||||
choices information for relational fields.</p>
|
choices information for relational fields.</p>
|
||||||
<p>If you want to override this new behavior you'll need to <a href="../../../api-guide/metadata/#custom-metadata-classes">implement a custom
|
<p>If you want to override this new behavior you'll need to <a href="../../../api-guide/metadata/#custom-metadata-classes">implement a custom
|
||||||
metadata class</a>.</p>
|
metadata class</a>.</p>
|
||||||
<p>See <a href="https://github.com/tomchristie/django-rest-framework/issues/3751">issue #3751</a> for more information on this behavioral change.</p>
|
<p>See <a href="https://github.com/encode/django-rest-framework/issues/3751">issue #3751</a> for more information on this behavioral change.</p>
|
||||||
<hr />
|
<hr />
|
||||||
<h2 id="other-improvements"><a class="toclink" href="#other-improvements">Other improvements</a></h2>
|
<h2 id="other-improvements"><a class="toclink" href="#other-improvements">Other improvements</a></h2>
|
||||||
<p>This release includes further work from a huge number of <a href="https://github.com/tomchristie/django-rest-framework/milestone/35">pull requests and issues</a>.</p>
|
<p>This release includes further work from a huge number of <a href="https://github.com/encode/django-rest-framework/milestone/35">pull requests and issues</a>.</p>
|
||||||
<p>Many thanks to all our contributors who've been involved in the release, either through raising issues, giving feedback, improving the documentation, or suggesting and implementing code changes.</p>
|
<p>Many thanks to all our contributors who've been involved in the release, either through raising issues, giving feedback, improving the documentation, or suggesting and implementing code changes.</p>
|
||||||
<p>The full set of itemized release notes <a href="../release-notes#34">are available here</a>.</p>
|
<p>The full set of itemized release notes <a href="../release-notes#34">are available here</a>.</p>
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3.6-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>
|
||||||
|
@ -554,7 +554,7 @@ environment is a powerful tool. However in order to do this, you'll need to pay
|
||||||
close attention to how you handle setup and teardown to ensure a strict isolation
|
close attention to how you handle setup and teardown to ensure a strict isolation
|
||||||
of test data from other live or staging data.</p>
|
of test data from other live or staging data.</p>
|
||||||
<h2 id="raml-support"><a class="toclink" href="#raml-support">RAML support</a></h2>
|
<h2 id="raml-support"><a class="toclink" href="#raml-support">RAML support</a></h2>
|
||||||
<p>We now have preliminary support for <a href="https://github.com/tomchristie/django-rest-raml">RAML documentation generation</a>.</p>
|
<p>We now have preliminary support for <a href="https://github.com/encode/django-rest-raml">RAML documentation generation</a>.</p>
|
||||||
<p><img alt="RAML Example" src="../../img/raml.png" /></p>
|
<p><img alt="RAML Example" src="../../img/raml.png" /></p>
|
||||||
<p>Further work on the encoding and documentation generation is planned, in order to
|
<p>Further work on the encoding and documentation generation is planned, in order to
|
||||||
make features such as the 'Try it now' support available at a later date.</p>
|
make features such as the 'Try it now' support available at a later date.</p>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/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="../kickstarter-announcement/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../html-and-forms/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../html-and-forms/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../internationalization/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../internationalization/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../rest-hypermedia-hateoas/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../rest-hypermedia-hateoas/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -513,7 +513,6 @@
|
||||||
<h4 id="autocomplete"><a class="toclink" href="#autocomplete">Autocomplete</a></h4>
|
<h4 id="autocomplete"><a class="toclink" href="#autocomplete">Autocomplete</a></h4>
|
||||||
<p>An alternative, but more complex option would be to replace the input with an autocomplete widget, that only loads and renders a subset of the available options as needed. If you need to do this you'll need to do some work to build a custom autocomplete HTML template yourself.</p>
|
<p>An alternative, but more complex option would be to replace the input with an autocomplete widget, that only loads and renders a subset of the available options as needed. If you need to do this you'll need to do some work to build a custom autocomplete HTML template yourself.</p>
|
||||||
<p>There are <a href="https://www.djangopackages.com/grids/g/auto-complete/">a variety of packages for autocomplete widgets</a>, such as <a href="https://github.com/yourlabs/django-autocomplete-light">django-autocomplete-light</a>, that you may want to refer to. Note that you will not be able to simply include these components as standard widgets, but will need to write the HTML template explicitly. This is because REST framework 3.0 no longer supports the <code>widget</code> keyword argument since it now uses templated HTML generation.</p>
|
<p>There are <a href="https://www.djangopackages.com/grids/g/auto-complete/">a variety of packages for autocomplete widgets</a>, such as <a href="https://github.com/yourlabs/django-autocomplete-light">django-autocomplete-light</a>, that you may want to refer to. Note that you will not be able to simply include these components as standard widgets, but will need to write the HTML template explicitly. This is because REST framework 3.0 no longer supports the <code>widget</code> keyword argument since it now uses templated HTML generation.</p>
|
||||||
<p>Better support for autocomplete inputs is planned in future versions.</p>
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../browsable-api/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../browsable-api/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -427,9 +427,9 @@
|
||||||
<p>— <a href="http://www.amazon.com/Restful-Web-Services-Leonard-Richardson/dp/0596529260">RESTful Web Services</a>, Leonard Richardson & Sam Ruby.</p>
|
<p>— <a href="http://www.amazon.com/Restful-Web-Services-Leonard-Richardson/dp/0596529260">RESTful Web Services</a>, Leonard Richardson & Sam Ruby.</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<p>In order to allow the browsable API to function, there are a couple of browser enhancements that REST framework needs to provide.</p>
|
<p>In order to allow the browsable API to function, there are a couple of browser enhancements that REST framework needs to provide.</p>
|
||||||
<p>As of version 3.3.0 onwards these are enabled with javascript, using the <a href="https://github.com/tomchristie/ajax-form">ajax-form</a> library.</p>
|
<p>As of version 3.3.0 onwards these are enabled with javascript, using the <a href="https://github.com/encode/ajax-form">ajax-form</a> library.</p>
|
||||||
<h2 id="browser-based-put-delete-etc"><a class="toclink" href="#browser-based-put-delete-etc">Browser based PUT, DELETE, etc...</a></h2>
|
<h2 id="browser-based-put-delete-etc"><a class="toclink" href="#browser-based-put-delete-etc">Browser based PUT, DELETE, etc...</a></h2>
|
||||||
<p>The <a href="https://github.com/tomchristie/ajax-form">AJAX form library</a> supports browser-based <code>PUT</code>, <code>DELETE</code> and other methods on HTML forms.</p>
|
<p>The <a href="https://github.com/encode/ajax-form">AJAX form library</a> supports browser-based <code>PUT</code>, <code>DELETE</code> and other methods on HTML forms.</p>
|
||||||
<p>After including the library, use the <code>data-method</code> attribute on the form, like so:</p>
|
<p>After including the library, use the <code>data-method</code> attribute on the form, like so:</p>
|
||||||
<pre><code><form action="/" data-method="PUT">
|
<pre><code><form action="/" data-method="PUT">
|
||||||
<input name='foo'/>
|
<input name='foo'/>
|
||||||
|
@ -438,7 +438,7 @@
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Note that prior to 3.3.0, this support was server-side rather than javascript based. The method overloading style (as used in <a href="http://guides.rubyonrails.org/form_helpers.html#how-do-forms-with-put-or-delete-methods-work">Ruby on Rails</a>) is no longer supported due to subtle issues that it introduces in request parsing.</p>
|
<p>Note that prior to 3.3.0, this support was server-side rather than javascript based. The method overloading style (as used in <a href="http://guides.rubyonrails.org/form_helpers.html#how-do-forms-with-put-or-delete-methods-work">Ruby on Rails</a>) is no longer supported due to subtle issues that it introduces in request parsing.</p>
|
||||||
<h2 id="browser-based-submission-of-non-form-content"><a class="toclink" href="#browser-based-submission-of-non-form-content">Browser based submission of non-form content</a></h2>
|
<h2 id="browser-based-submission-of-non-form-content"><a class="toclink" href="#browser-based-submission-of-non-form-content">Browser based submission of non-form content</a></h2>
|
||||||
<p>Browser-based submission of content types such as JSON are supported by the <a href="https://github.com/tomchristie/ajax-form">AJAX form library</a>, using form fields with <code>data-override='content-type'</code> and <code>data-override='content'</code> attributes.</p>
|
<p>Browser-based submission of content types such as JSON are supported by the <a href="https://github.com/encode/ajax-form">AJAX form library</a>, using form fields with <code>data-override='content-type'</code> and <code>data-override='content'</code> attributes.</p>
|
||||||
<p>For example:</p>
|
<p>For example:</p>
|
||||||
<pre><code> <form action="/">
|
<pre><code> <form action="/">
|
||||||
<input data-override='content-type' value='application/json' type='hidden'/>
|
<input data-override='content-type' value='application/json' type='hidden'/>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../project-management/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../project-management/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -467,7 +467,7 @@
|
||||||
<p>Be mindful in the language you choose. As an example, in an environment that is heavily male-dominated, posts that start 'Hey guys,' can come across as unintentionally exclusive. It's just as easy, and more inclusive to use gender neutral language in those situations.</p>
|
<p>Be mindful in the language you choose. As an example, in an environment that is heavily male-dominated, posts that start 'Hey guys,' can come across as unintentionally exclusive. It's just as easy, and more inclusive to use gender neutral language in those situations.</p>
|
||||||
<p>The <a href="https://www.djangoproject.com/conduct/">Django code of conduct</a> gives a fuller set of guidelines for participating in community forums.</p>
|
<p>The <a href="https://www.djangoproject.com/conduct/">Django code of conduct</a> gives a fuller set of guidelines for participating in community forums.</p>
|
||||||
<h1 id="issues"><a class="toclink" href="#issues">Issues</a></h1>
|
<h1 id="issues"><a class="toclink" href="#issues">Issues</a></h1>
|
||||||
<p>It's really helpful if you can make sure to address issues on the correct channel. Usage questions should be directed to the <a href="https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework">discussion group</a>. Feature requests, bug reports and other issues should be raised on the GitHub <a href="https://github.com/tomchristie/django-rest-framework/issues?state=open">issue tracker</a>.</p>
|
<p>It's really helpful if you can make sure to address issues on the correct channel. Usage questions should be directed to the <a href="https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework">discussion group</a>. Feature requests, bug reports and other issues should be raised on the GitHub <a href="https://github.com/encode/django-rest-framework/issues?state=open">issue tracker</a>.</p>
|
||||||
<p>Some tips on good issue reporting:</p>
|
<p>Some tips on good issue reporting:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>When describing issues try to phrase your ticket in terms of the <em>behavior</em> you think needs changing rather than the <em>code</em> you think need changing.</li>
|
<li>When describing issues try to phrase your ticket in terms of the <em>behavior</em> you think needs changing rather than the <em>code</em> you think need changing.</li>
|
||||||
|
@ -487,7 +487,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
<h1 id="development"><a class="toclink" href="#development">Development</a></h1>
|
<h1 id="development"><a class="toclink" href="#development">Development</a></h1>
|
||||||
<p>To start developing on Django REST framework, clone the repo:</p>
|
<p>To start developing on Django REST framework, clone the repo:</p>
|
||||||
<pre><code>git clone git@github.com:tomchristie/django-rest-framework.git
|
<pre><code>git clone git@github.com:encode/django-rest-framework.git
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>Changes should broadly follow the <a href="http://www.python.org/dev/peps/pep-0008/">PEP 8</a> style conventions, and we recommend you set up your editor to automatically indicate non-conforming styles.</p>
|
<p>Changes should broadly follow the <a href="http://www.python.org/dev/peps/pep-0008/">PEP 8</a> style conventions, and we recommend you set up your editor to automatically indicate non-conforming styles.</p>
|
||||||
<h2 id="testing"><a class="toclink" href="#testing">Testing</a></h2>
|
<h2 id="testing"><a class="toclink" href="#testing">Testing</a></h2>
|
||||||
|
@ -540,7 +540,7 @@ pip install -r requirements.txt
|
||||||
<h2 id="managing-compatibility-issues"><a class="toclink" href="#managing-compatibility-issues">Managing compatibility issues</a></h2>
|
<h2 id="managing-compatibility-issues"><a class="toclink" href="#managing-compatibility-issues">Managing compatibility issues</a></h2>
|
||||||
<p>Sometimes, in order to ensure your code works on various different versions of Django, Python or third party libraries, you'll need to run slightly different code depending on the environment. Any code that branches in this way should be isolated into the <code>compat.py</code> module, and should provide a single common interface that the rest of the codebase can use.</p>
|
<p>Sometimes, in order to ensure your code works on various different versions of Django, Python or third party libraries, you'll need to run slightly different code depending on the environment. Any code that branches in this way should be isolated into the <code>compat.py</code> module, and should provide a single common interface that the rest of the codebase can use.</p>
|
||||||
<h1 id="documentation"><a class="toclink" href="#documentation">Documentation</a></h1>
|
<h1 id="documentation"><a class="toclink" href="#documentation">Documentation</a></h1>
|
||||||
<p>The documentation for REST framework is built from the <a href="http://daringfireball.net/projects/markdown/basics">Markdown</a> source files in <a href="https://github.com/tomchristie/django-rest-framework/tree/master/docs">the docs directory</a>.</p>
|
<p>The documentation for REST framework is built from the <a href="http://daringfireball.net/projects/markdown/basics">Markdown</a> source files in <a href="https://github.com/encode/django-rest-framework/tree/master/docs">the docs directory</a>.</p>
|
||||||
<p>There are many great Markdown editors that make working with the documentation really easy. The <a href="http://mouapp.com/">Mou editor for Mac</a> is one such editor that comes highly recommended.</p>
|
<p>There are many great Markdown editors that make working with the documentation really easy. The <a href="http://mouapp.com/">Mou editor for Mac</a> is one such editor that comes highly recommended.</p>
|
||||||
<h2 id="building-the-documentation"><a class="toclink" href="#building-the-documentation">Building the documentation</a></h2>
|
<h2 id="building-the-documentation"><a class="toclink" href="#building-the-documentation">Building the documentation</a></h2>
|
||||||
<p>To build the documentation, install MkDocs with <code>pip install mkdocs</code> and then run the following command.</p>
|
<p>To build the documentation, install MkDocs with <code>pip install mkdocs</code> and then run the following command.</p>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../api-clients/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../api-clients/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../release-notes/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../release-notes/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -741,7 +741,7 @@ DRF is one of the core reasons why Django is top choice among web frameworks tod
|
||||||
<p>For further enquires please contact <a href=mailto:funding@django-rest-framework.org>funding@django-rest-framework.org</a>.</p>
|
<p>For further enquires please contact <a href=mailto:funding@django-rest-framework.org>funding@django-rest-framework.org</a>.</p>
|
||||||
<hr />
|
<hr />
|
||||||
<h2 id="accountability"><a class="toclink" href="#accountability">Accountability</a></h2>
|
<h2 id="accountability"><a class="toclink" href="#accountability">Accountability</a></h2>
|
||||||
<p>In an effort to keep the project as transparent as possible, we are releasing <a href="http://www.encode.io/reports/february-2017">monthly progress reports</a> and regularly include financial reports and cost breakdowns.</p>
|
<p>In an effort to keep the project as transparent as possible, we are releasing <a href="http://www.encode.io/reports/march-2017">monthly progress reports</a> and regularly include financial reports and cost breakdowns.</p>
|
||||||
<!-- Begin MailChimp Signup Form -->
|
<!-- Begin MailChimp Signup Form -->
|
||||||
|
|
||||||
<p><link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet" type="text/css">
|
<p><link href="//cdn-images.mailchimp.com/embedcode/classic-10_7.css" rel="stylesheet" type="text/css">
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../browser-enhancements/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../browser-enhancements/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../ajax-csrf-cors/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../ajax-csrf-cors/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -473,13 +473,13 @@ Host: example.org
|
||||||
<p>Now create a subfolder for the language you want to translate. The folder should be named using <a href="https://docs.djangoproject.com/en/1.7/topics/i18n/#term-locale-name">locale name</a> notation. For example: <code>de</code>, <code>pt_BR</code>, <code>es_AR</code>.</p>
|
<p>Now create a subfolder for the language you want to translate. The folder should be named using <a href="https://docs.djangoproject.com/en/1.7/topics/i18n/#term-locale-name">locale name</a> notation. For example: <code>de</code>, <code>pt_BR</code>, <code>es_AR</code>.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Now copy the <a href="https://raw.githubusercontent.com/tomchristie/django-rest-framework/master/rest_framework/locale/en_US/LC_MESSAGES/django.po">base translations file</a> from the REST framework source code into your translations folder.</p>
|
<p>Now copy the <a href="https://raw.githubusercontent.com/encode/django-rest-framework/master/rest_framework/locale/en_US/LC_MESSAGES/django.po">base translations file</a> from the REST framework source code into your translations folder.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Edit the <code>django.po</code> file you've just copied, translating all the error messages.</p>
|
<p>Edit the <code>django.po</code> file you've just copied, translating all the error messages.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p>Run <code>manage.py compilemessages -l pt_BR</code> to make the translations
|
<p>Run <code>manage.py compilemessages -l pt_BR</code> to make the translations
|
||||||
available for Django to use. You should see a message like <code>processing file django.po in <...>/locale/pt_BR/LC_MESSAGES</code>.</p>
|
available for Django to use. You should see a message like <code>processing file django.po in <...>/locale/pt_BR/LC_MESSAGES</code>.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/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="../3.0-announcement/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -417,7 +417,7 @@
|
||||||
<li><a href="https://remoteok.io/remote-django-jobs">https://remoteok.io/remote-django-jobs</a></li>
|
<li><a href="https://remoteok.io/remote-django-jobs">https://remoteok.io/remote-django-jobs</a></li>
|
||||||
<li><a href="https://www.remotepython.com/jobs/">https://www.remotepython.com/jobs/</a></li>
|
<li><a href="https://www.remotepython.com/jobs/">https://www.remotepython.com/jobs/</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>Know of any other great resources for Django REST Framework jobs that are missing in our list? 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>
|
<p>Know of any other great resources for Django REST Framework jobs that are missing in our list? Please <a href="https://github.com/encode/django-rest-framework">submit a pull request</a> or <a href="mailto:anna@django-rest-framework.org">email us</a>.</p>
|
||||||
<p>Wonder how else you can help? One of the best ways you can help Django REST Framework is to ask interviewers if their company is signed up for <a href="https://fund.django-rest-framework.org/topics/funding/">REST Framework sponsorship</a> yet.</p>
|
<p>Wonder how else you can help? One of the best ways you can help Django REST Framework is to ask interviewers if their company is signed up for <a href="https://fund.django-rest-framework.org/topics/funding/">REST Framework sponsorship</a> yet.</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<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>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../funding/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../funding/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/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 " rel="prev" href="../jobs/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -429,9 +429,9 @@
|
||||||
<h2 id="maintenance-team"><a class="toclink" href="#maintenance-team">Maintenance team</a></h2>
|
<h2 id="maintenance-team"><a class="toclink" href="#maintenance-team">Maintenance team</a></h2>
|
||||||
<p>We have a quarterly maintenance cycle where new members may join the maintenance team. We currently cap the size of the team at 5 members, and may encourage folks to step out of the team for a cycle to allow new members to participate.</p>
|
<p>We have a quarterly maintenance cycle where new members may join the maintenance team. We currently cap the size of the team at 5 members, and may encourage folks to step out of the team for a cycle to allow new members to participate.</p>
|
||||||
<h4 id="current-team"><a class="toclink" href="#current-team">Current team</a></h4>
|
<h4 id="current-team"><a class="toclink" href="#current-team">Current team</a></h4>
|
||||||
<p>The <a href="https://github.com/tomchristie/django-rest-framework/issues/2190">maintenance team for Q4 2015</a>:</p>
|
<p>The <a href="https://github.com/encode/django-rest-framework/issues/2190">maintenance team for Q4 2015</a>:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://github.com/tomchristie/">@tomchristie</a></li>
|
<li><a href="https://github.com/encode/">@tomchristie</a></li>
|
||||||
<li><a href="https://github.com/xordoquy/">@xordoquy</a> (Release manager.)</li>
|
<li><a href="https://github.com/xordoquy/">@xordoquy</a> (Release manager.)</li>
|
||||||
<li><a href="https://github.com/carltongibson/">@carltongibson</a></li>
|
<li><a href="https://github.com/carltongibson/">@carltongibson</a></li>
|
||||||
<li><a href="https://github.com/kevin-brown/">@kevin-brown</a></li>
|
<li><a href="https://github.com/kevin-brown/">@kevin-brown</a></li>
|
||||||
|
@ -484,7 +484,7 @@ To modify this process for future maintenance cycles make a pull request to the
|
||||||
<li>Code changes should come in the form of a pull request - do not push directly to master.</li>
|
<li>Code changes should come in the form of a pull request - do not push directly to master.</li>
|
||||||
<li>Maintainers should typically not merge their own pull requests.</li>
|
<li>Maintainers should typically not merge their own pull requests.</li>
|
||||||
<li>Each issue/pull request should have exactly one label once triaged.</li>
|
<li>Each issue/pull request should have exactly one label once triaged.</li>
|
||||||
<li>Search for un-triaged issues with <a href="https://github.com/tomchristie/django-rest-framework/issues?q=is%3Aopen+no%3Alabel">is:open no:label</a>.</li>
|
<li>Search for un-triaged issues with <a href="https://github.com/encode/django-rest-framework/issues?q=is%3Aopen+no%3Alabel">is:open no:label</a>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>It should be noted that participating actively in the REST framework project clearly <strong>does not require being part of the maintenance team</strong>. Almost every import part of issue triage and project improvement can be actively worked on regardless of your collaborator status on the repository.</p>
|
<p>It should be noted that participating actively in the REST framework project clearly <strong>does not require being part of the maintenance team</strong>. Almost every import part of issue triage and project improvement can be actively worked on regardless of your collaborator status on the repository.</p>
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -507,9 +507,9 @@ During development cycle:
|
||||||
|
|
||||||
Checklist:
|
Checklist:
|
||||||
|
|
||||||
- [ ] Create pull request for [release notes](https://github.com/tomchristie/django-rest-framework/blob/master/docs/topics/release-notes.md) based on the [*.*.* milestone](https://github.com/tomchristie/django-rest-framework/milestones/***).
|
- [ ] Create pull request for [release notes](https://github.com/encode/django-rest-framework/blob/master/docs/topics/release-notes.md) based on the [*.*.* milestone](https://github.com/encode/django-rest-framework/milestones/***).
|
||||||
- [ ] Update the translations from [transifex](http://www.django-rest-framework.org/topics/project-management/#translations).
|
- [ ] Update the translations from [transifex](http://www.django-rest-framework.org/topics/project-management/#translations).
|
||||||
- [ ] Ensure the pull request increments the version to `*.*.*` in [`restframework/__init__.py`](https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/__init__.py).
|
- [ ] Ensure the pull request increments the version to `*.*.*` in [`restframework/__init__.py`](https://github.com/encode/django-rest-framework/blob/master/rest_framework/__init__.py).
|
||||||
- [ ] Confirm with @tomchristie that release is finalized and ready to go.
|
- [ ] Confirm with @tomchristie that release is finalized and ready to go.
|
||||||
- [ ] Ensure that release date is included in pull request.
|
- [ ] Ensure that release date is included in pull request.
|
||||||
- [ ] Merge the release pull request.
|
- [ ] Merge the release pull request.
|
||||||
|
@ -572,7 +572,7 @@ django-admin.py compilemessages
|
||||||
<h4 id="outstanding-management-ownership-issues"><a class="toclink" href="#outstanding-management-ownership-issues">Outstanding management & ownership issues</a></h4>
|
<h4 id="outstanding-management-ownership-issues"><a class="toclink" href="#outstanding-management-ownership-issues">Outstanding management & ownership issues</a></h4>
|
||||||
<p>The following issues still need to be addressed:</p>
|
<p>The following issues still need to be addressed:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://github.com/tomchristie/django-rest-framework/issues/2162">Consider moving the repo into a proper GitHub organization</a>.</li>
|
<li><a href="https://github.com/encode/django-rest-framework/issues/2162">Consider moving the repo into a proper GitHub organization</a>.</li>
|
||||||
<li>Ensure <code>@jamie</code> has back-up access to the <code>django-rest-framework.org</code> domain setup and admin.</li>
|
<li>Ensure <code>@jamie</code> has back-up access to the <code>django-rest-framework.org</code> domain setup and admin.</li>
|
||||||
<li>Document ownership of the <a href="http://restframework.herokuapp.com/">live example</a> API.</li>
|
<li>Document ownership of the <a href="http://restframework.herokuapp.com/">live example</a> API.</li>
|
||||||
<li>Document ownership of the <a href="https://groups.google.com/forum/#!forum/django-rest-framework">mailing list</a> and IRC channel.</li>
|
<li>Document ownership of the <a href="https://groups.google.com/forum/#!forum/django-rest-framework">mailing list</a> and IRC channel.</li>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../third-party-packages/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../third-party-packages/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../tutorials-and-resources/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../tutorials-and-resources/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -513,19 +513,19 @@ You probably want to also tag the version now:
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h4 id="version-compatibility"><a class="toclink" href="#version-compatibility">Version compatibility</a></h4>
|
<h4 id="version-compatibility"><a class="toclink" href="#version-compatibility">Version compatibility</a></h4>
|
||||||
<p>Sometimes, in order to ensure your code works on various different versions of Django, Python or third party libraries, you'll need to run slightly different code depending on the environment. Any code that branches in this way should be isolated into a <code>compat.py</code> module, and should provide a single common interface that the rest of the codebase can use.</p>
|
<p>Sometimes, in order to ensure your code works on various different versions of Django, Python or third party libraries, you'll need to run slightly different code depending on the environment. Any code that branches in this way should be isolated into a <code>compat.py</code> module, and should provide a single common interface that the rest of the codebase can use.</p>
|
||||||
<p>Check out Django REST framework's <a href="https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/compat.py">compat.py</a> for an example.</p>
|
<p>Check out Django REST framework's <a href="https://github.com/encode/django-rest-framework/blob/master/rest_framework/compat.py">compat.py</a> for an example.</p>
|
||||||
<h3 id="once-your-package-is-available"><a class="toclink" href="#once-your-package-is-available">Once your package is available</a></h3>
|
<h3 id="once-your-package-is-available"><a class="toclink" href="#once-your-package-is-available">Once your package is available</a></h3>
|
||||||
<p>Once your package is decently documented and available on PyPI, you might want share it with others that might find it useful.</p>
|
<p>Once your package is decently documented and available on PyPI, you might want share it with others that might find it useful.</p>
|
||||||
<h4 id="adding-to-the-django-rest-framework-grid"><a class="toclink" href="#adding-to-the-django-rest-framework-grid">Adding to the Django REST framework grid</a></h4>
|
<h4 id="adding-to-the-django-rest-framework-grid"><a class="toclink" href="#adding-to-the-django-rest-framework-grid">Adding to the Django REST framework grid</a></h4>
|
||||||
<p>We suggest adding your package to the <a href="https://www.djangopackages.com/grids/g/django-rest-framework/">REST Framework</a> grid on Django Packages.</p>
|
<p>We suggest adding your package to the <a href="https://www.djangopackages.com/grids/g/django-rest-framework/">REST Framework</a> grid on Django Packages.</p>
|
||||||
<h4 id="adding-to-the-django-rest-framework-docs"><a class="toclink" href="#adding-to-the-django-rest-framework-docs">Adding to the Django REST framework docs</a></h4>
|
<h4 id="adding-to-the-django-rest-framework-docs"><a class="toclink" href="#adding-to-the-django-rest-framework-docs">Adding to the Django REST framework docs</a></h4>
|
||||||
<p>Create a <a href="https://github.com/tomchristie/django-rest-framework/compare">Pull Request</a> or <a href="https://github.com/tomchristie/django-rest-framework/issues/new">Issue</a> on GitHub, and we'll add a link to it from the main REST framework documentation. You can add your package under <strong>Third party packages</strong> of the API Guide section that best applies, like <a href="../../api-guide/authentication/">Authentication</a> or <a href="../../api-guide/permissions/">Permissions</a>. You can also link your package under the <a href="../../topics/third-party-packages/#existing-third-party-packages">Third Party Packages</a> section.</p>
|
<p>Create a <a href="https://github.com/encode/django-rest-framework/compare">Pull Request</a> or <a href="https://github.com/encode/django-rest-framework/issues/new">Issue</a> on GitHub, and we'll add a link to it from the main REST framework documentation. You can add your package under <strong>Third party packages</strong> of the API Guide section that best applies, like <a href="../../api-guide/authentication/">Authentication</a> or <a href="../../api-guide/permissions/">Permissions</a>. You can also link your package under the <a href="../../topics/third-party-packages/#existing-third-party-packages">Third Party Packages</a> section.</p>
|
||||||
<h4 id="announce-on-the-discussion-group"><a class="toclink" href="#announce-on-the-discussion-group">Announce on the discussion group.</a></h4>
|
<h4 id="announce-on-the-discussion-group"><a class="toclink" href="#announce-on-the-discussion-group">Announce on the discussion group.</a></h4>
|
||||||
<p>You can also let others know about your package through the <a href="https://groups.google.com/forum/#!forum/django-rest-framework">discussion group</a>.</p>
|
<p>You can also let others know about your package through the <a href="https://groups.google.com/forum/#!forum/django-rest-framework">discussion group</a>.</p>
|
||||||
<h2 id="existing-third-party-packages"><a class="toclink" href="#existing-third-party-packages">Existing Third Party Packages</a></h2>
|
<h2 id="existing-third-party-packages"><a class="toclink" href="#existing-third-party-packages">Existing Third Party Packages</a></h2>
|
||||||
<p>Django REST Framework has a growing community of developers, packages, and resources.</p>
|
<p>Django REST Framework has a growing community of developers, packages, and resources.</p>
|
||||||
<p>Check out a grid detailing all the packages and ecosystem around Django REST Framework at <a href="https://www.djangopackages.com/grids/g/django-rest-framework/">Django Packages</a>.</p>
|
<p>Check out a grid detailing all the packages and ecosystem around Django REST Framework at <a href="https://www.djangopackages.com/grids/g/django-rest-framework/">Django Packages</a>.</p>
|
||||||
<p>To submit new content, <a href="https://github.com/tomchristie/django-rest-framework/issues/new">open an issue</a> or <a href="https://github.com/tomchristie/django-rest-framework/compare">create a pull request</a>.</p>
|
<p>To submit new content, <a href="https://github.com/encode/django-rest-framework/issues/new">open an issue</a> or <a href="https://github.com/encode/django-rest-framework/compare">create a pull request</a>.</p>
|
||||||
<h3 id="authentication"><a class="toclink" href="#authentication">Authentication</a></h3>
|
<h3 id="authentication"><a class="toclink" href="#authentication">Authentication</a></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://github.com/juanriaza/django-rest-framework-digestauth">djangorestframework-digestauth</a> - Provides Digest Access Authentication support.</li>
|
<li><a href="https://github.com/juanriaza/django-rest-framework-digestauth">djangorestframework-digestauth</a> - Provides Digest Access Authentication support.</li>
|
||||||
|
@ -537,6 +537,7 @@ You probably want to also tag the version now:
|
||||||
<li><a href="https://github.com/sunscrapers/djoser">djoser</a> - Provides a set of views to handle basic actions such as registration, login, logout, password reset and account activation.</li>
|
<li><a href="https://github.com/sunscrapers/djoser">djoser</a> - Provides a set of views to handle basic actions such as registration, login, logout, password reset and account activation.</li>
|
||||||
<li><a href="https://github.com/Tivix/django-rest-auth/">django-rest-auth</a> - Provides a set of REST API endpoints for registration, authentication (including social media authentication), password reset, retrieve and update user details, etc.</li>
|
<li><a href="https://github.com/Tivix/django-rest-auth/">django-rest-auth</a> - Provides a set of REST API endpoints for registration, authentication (including social media authentication), password reset, retrieve and update user details, etc.</li>
|
||||||
<li><a href="https://github.com/ByteInternet/drf-oidc-auth">drf-oidc-auth</a> - Implements OpenID Connect token authentication for DRF.</li>
|
<li><a href="https://github.com/ByteInternet/drf-oidc-auth">drf-oidc-auth</a> - Implements OpenID Connect token authentication for DRF.</li>
|
||||||
|
<li><a href="https://github.com/aaronn/django-rest-framework-passwordless">drfpasswordless</a> - Adds (Medium, Square Cash inspired) passwordless logins and signups via email and mobile numbers.</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="permissions"><a class="toclink" href="#permissions">Permissions</a></h3>
|
<h3 id="permissions"><a class="toclink" href="#permissions">Permissions</a></h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -607,6 +608,7 @@ You probably want to also tag the version now:
|
||||||
<li><a href="https://drf-haystack.readthedocs.io/en/latest/">drf-haystack</a> - Haystack search for Django Rest Framework</li>
|
<li><a href="https://drf-haystack.readthedocs.io/en/latest/">drf-haystack</a> - Haystack search for Django Rest Framework</li>
|
||||||
<li><a href="https://github.com/mrhwick/django-rest-framework-version-transforms">django-rest-framework-version-transforms</a> - Enables the use of delta transformations for versioning of DRF resource representations.</li>
|
<li><a href="https://github.com/mrhwick/django-rest-framework-version-transforms">django-rest-framework-version-transforms</a> - Enables the use of delta transformations for versioning of DRF resource representations.</li>
|
||||||
<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>
|
<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>
|
||||||
|
<li><a href="https://github.com/dealertrack/djangorest-alchemy">djangorest-alchemy</a> - SQLAlchemy support for REST framework.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../contributing/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../contributing/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -382,6 +382,10 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="#books">Books</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="#tutorials">Tutorials</a>
|
<a href="#tutorials">Tutorials</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -394,10 +398,6 @@
|
||||||
<a href="#articles">Articles</a>
|
<a href="#articles">Articles</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
|
||||||
<a href="#books">Books</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="promo">
|
<div class="promo">
|
||||||
|
@ -415,6 +415,16 @@
|
||||||
|
|
||||||
<h1 id="tutorials-and-resources"><a class="toclink" href="#tutorials-and-resources">Tutorials and Resources</a></h1>
|
<h1 id="tutorials-and-resources"><a class="toclink" href="#tutorials-and-resources">Tutorials and Resources</a></h1>
|
||||||
<p>There are a wide range of resources available for learning and using Django REST framework. We try to keep a comprehensive list available here.</p>
|
<p>There are a wide range of resources available for learning and using Django REST framework. We try to keep a comprehensive list available here.</p>
|
||||||
|
<h2 id="books"><a class="toclink" href="#books">Books</a></h2>
|
||||||
|
<div class="book-covers">
|
||||||
|
<a class="book-cover" href="https://hellowebapp.com/order/">
|
||||||
|
<img src="../../img/books/hwa-cover.png"/>
|
||||||
|
</a>
|
||||||
|
<a class="book-cover" href="https://www.twoscoopspress.com/products/two-scoops-of-django-1-11">
|
||||||
|
<img src="../../img/books/tsd-cover.png"/>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h2 id="tutorials"><a class="toclink" href="#tutorials">Tutorials</a></h2>
|
<h2 id="tutorials"><a class="toclink" href="#tutorials">Tutorials</a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="http://code.tutsplus.com/tutorials/beginners-guide-to-the-django-rest-framework--cms-19786">Beginner's Guide to the Django REST Framework</a></li>
|
<li><a href="http://code.tutsplus.com/tutorials/beginners-guide-to-the-django-rest-framework--cms-19786">Beginner's Guide to the Django REST Framework</a></li>
|
||||||
|
@ -464,16 +474,12 @@
|
||||||
<li><a href="https://blog.levit.be/new-django-admin-with-emberjs-what-are-the-news/">New Django Admin with DRF and EmberJS... What are the News?</a></li>
|
<li><a href="https://blog.levit.be/new-django-admin-with-emberjs-what-are-the-news/">New Django Admin with DRF and EmberJS... What are the News?</a></li>
|
||||||
<li><a href="https://medium.com/django-rest-framework">Blog posts about Django REST Framework</a></li>
|
<li><a href="https://medium.com/django-rest-framework">Blog posts about Django REST Framework</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h2 id="books"><a class="toclink" href="#books">Books</a></h2>
|
|
||||||
<ul>
|
|
||||||
<li><a href="https://hellowebapp.com/order/">Hello Web App: Intermediate Concepts, Chapter 10</a></li>
|
|
||||||
</ul>
|
|
||||||
<h3 id="documentations"><a class="toclink" href="#documentations">Documentations</a></h3>
|
<h3 id="documentations"><a class="toclink" href="#documentations">Documentations</a></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<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 <a href="mailto:anna@django-rest-framework.org">email us</a>!</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/encode/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-->
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../2-requests-and-responses/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../2-requests-and-responses/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -442,7 +442,7 @@
|
||||||
<p>This tutorial will cover creating a simple pastebin code highlighting Web API. Along the way it will introduce the various components that make up REST framework, and give you a comprehensive understanding of how everything fits together.</p>
|
<p>This tutorial will cover creating a simple pastebin code highlighting Web API. Along the way it will introduce the various components that make up REST framework, and give you a comprehensive understanding of how everything fits together.</p>
|
||||||
<p>The tutorial is fairly in-depth, so you should probably get a cookie and a cup of your favorite brew before getting started. If you just want a quick overview, you should head over to the <a href="../quickstart/">quickstart</a> documentation instead.</p>
|
<p>The tutorial is fairly in-depth, so you should probably get a cookie and a cup of your favorite brew before getting started. If you just want a quick overview, you should head over to the <a href="../quickstart/">quickstart</a> documentation instead.</p>
|
||||||
<hr />
|
<hr />
|
||||||
<p><strong>Note</strong>: The code for this tutorial is available in the <a href="https://github.com/tomchristie/rest-framework-tutorial">tomchristie/rest-framework-tutorial</a> repository on GitHub. The completed implementation is also online as a sandbox version for testing, <a href="http://restframework.herokuapp.com/">available here</a>.</p>
|
<p><strong>Note</strong>: The code for this tutorial is available in the <a href="https://github.com/encode/rest-framework-tutorial">tomchristie/rest-framework-tutorial</a> repository on GitHub. The completed implementation is also online as a sandbox version for testing, <a href="http://restframework.herokuapp.com/">available here</a>.</p>
|
||||||
<hr />
|
<hr />
|
||||||
<h2 id="setting-up-a-new-environment"><a class="toclink" href="#setting-up-a-new-environment">Setting up a new environment</a></h2>
|
<h2 id="setting-up-a-new-environment"><a class="toclink" href="#setting-up-a-new-environment">Setting up a new environment</a></h2>
|
||||||
<p>Before we do anything else we'll create a new virtual environment, using <a href="http://www.virtualenv.org/en/latest/index.html">virtualenv</a>. This will make sure our package configuration is kept nicely isolated from any other projects we're working on.</p>
|
<p>Before we do anything else we'll create a new virtual environment, using <a href="http://www.virtualenv.org/en/latest/index.html">virtualenv</a>. This will make sure our package configuration is kept nicely isolated from any other projects we're working on.</p>
|
||||||
|
@ -696,7 +696,7 @@ urlpatterns = [
|
||||||
Validating models...
|
Validating models...
|
||||||
|
|
||||||
0 errors found
|
0 errors found
|
||||||
Django version 1.8.3, using settings 'tutorial.settings'
|
Django version 1.11, using settings 'tutorial.settings'
|
||||||
Development server is running at http://127.0.0.1:8000/
|
Development server is running at http://127.0.0.1:8000/
|
||||||
Quit the server with CONTROL-C.
|
Quit the server with CONTROL-C.
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3-class-based-views/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../3-class-based-views/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../4-authentication-and-permissions/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../4-authentication-and-permissions/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../5-relationships-and-hyperlinked-apis/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../5-relationships-and-hyperlinked-apis/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../6-viewsets-and-routers/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../6-viewsets-and-routers/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../7-schemas-and-client-libraries/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../7-schemas-and-client-libraries/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../../api-guide/requests/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../../api-guide/requests/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -447,15 +447,16 @@ API schema.</p>
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>We can now include a schema for our API, by including an autogenerated schema
|
<p>We can now include a schema for our API, by including an autogenerated schema
|
||||||
view in our URL configuration.</p>
|
view in our URL configuration.</p>
|
||||||
<pre><code>from rest_framework.schemas import get_schema_view
|
<pre><code> from rest_framework.schemas import get_schema_view
|
||||||
|
|
||||||
schema_view = get_schema_view(title='Pastebin API')
|
schema_view = get_schema_view(title='Pastebin API')
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
</code></pre>
|
url(r'^schema/$', schema_view),
|
||||||
<p>url(r'^schema/$', schema_view),
|
|
||||||
...
|
...
|
||||||
]</p>
|
]
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
<p>If you visit the API root endpoint in a browser you should now see <code>corejson</code>
|
<p>If you visit the API root endpoint in a browser you should now see <code>corejson</code>
|
||||||
representation become available as an option.</p>
|
representation become available as an option.</p>
|
||||||
<p><img alt="Schema format" src="../../img/corejson-format.png" /></p>
|
<p><img alt="Schema format" src="../../img/corejson-format.png" /></p>
|
||||||
|
@ -593,11 +594,11 @@ client libraries you'll need to refer to the full documentation.</p>
|
||||||
<h2 id="reviewing-our-work"><a class="toclink" href="#reviewing-our-work">Reviewing our work</a></h2>
|
<h2 id="reviewing-our-work"><a class="toclink" href="#reviewing-our-work">Reviewing our work</a></h2>
|
||||||
<p>With an incredibly small amount of code, we've now got a complete pastebin Web API, which is fully web browsable, includes a schema-driven client library, and comes complete with authentication, per-object permissions, and multiple renderer formats.</p>
|
<p>With an incredibly small amount of code, we've now got a complete pastebin Web API, which is fully web browsable, includes a schema-driven client library, and comes complete with authentication, per-object permissions, and multiple renderer formats.</p>
|
||||||
<p>We've walked through each step of the design process, and seen how if we need to customize anything we can gradually work our way down to simply using regular Django views.</p>
|
<p>We've walked through each step of the design process, and seen how if we need to customize anything we can gradually work our way down to simply using regular Django views.</p>
|
||||||
<p>You can review the final <a href="https://github.com/tomchristie/rest-framework-tutorial">tutorial code</a> on GitHub, or try out a live example in <a href="http://restframework.herokuapp.com/">the sandbox</a>.</p>
|
<p>You can review the final <a href="https://github.com/encode/rest-framework-tutorial">tutorial code</a> on GitHub, or try out a live example in <a href="http://restframework.herokuapp.com/">the sandbox</a>.</p>
|
||||||
<h2 id="onwards-and-upwards"><a class="toclink" href="#onwards-and-upwards">Onwards and upwards</a></h2>
|
<h2 id="onwards-and-upwards"><a class="toclink" href="#onwards-and-upwards">Onwards and upwards</a></h2>
|
||||||
<p>We've reached the end of our tutorial. If you want to get more involved in the REST framework project, here are a few places you can start:</p>
|
<p>We've reached the end of our tutorial. If you want to get more involved in the REST framework project, here are a few places you can start:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Contribute on <a href="https://github.com/tomchristie/django-rest-framework">GitHub</a> by reviewing and submitting issues, and making pull requests.</li>
|
<li>Contribute on <a href="https://github.com/encode/django-rest-framework">GitHub</a> by reviewing and submitting issues, and making pull requests.</li>
|
||||||
<li>Join the <a href="https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework">REST framework discussion group</a>, and help build the community.</li>
|
<li>Join the <a href="https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework">REST framework discussion group</a>, and help build the community.</li>
|
||||||
<li>Follow <a href="https://twitter.com/_tomchristie">the author</a> on Twitter and say hi.</li>
|
<li>Follow <a href="https://twitter.com/_tomchristie">the author</a> on Twitter and say hi.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||||
<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/encode/django-rest-framework/tree/master">GitHub</a>
|
||||||
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../1-serialization/">
|
<a class="repo-link btn btn-inverse btn-small " rel="prev" href="../1-serialization/">
|
||||||
Next <i class="icon-arrow-right icon-white"></i>
|
Next <i class="icon-arrow-right icon-white"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user