mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 19:14:01 +03:00
Latest docs
This commit is contained in:
parent
a1dd458116
commit
77da335ce8
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="authentication-page">
|
||||
|
||||
|
@ -189,11 +204,9 @@
|
|||
<li><a href="#hawk-http-authentication">Hawk HTTP Authentication</a></li>
|
||||
<li><a href="#http-signature-authentication">HTTP Signature Authentication</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -505,6 +518,7 @@ class ExampleAuthentication(authentication.BaseAuthentication):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="content-negotiation-page">
|
||||
|
||||
|
@ -174,11 +189,9 @@
|
|||
<li><a href="#example">Example</a></li>
|
||||
<li><a href="#setting-the-content-negotiation">Setting the content negotiation</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -276,6 +289,7 @@ class NoNegotiationView(APIView):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="exceptions-page">
|
||||
|
||||
|
@ -181,11 +196,9 @@
|
|||
<li><a href="#unsupportedmediatype">UnsupportedMediaType</a></li>
|
||||
<li><a href="#throttled">Throttled</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -313,6 +326,7 @@ class ServiceUnavailable(APIException):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="fields-page">
|
||||
|
||||
|
@ -196,11 +211,9 @@
|
|||
<li class="main"><a href="#third-party-packages">Third party packages</a></li>
|
||||
<li><a href="#drf-compound-fields">DRF Compound Fields</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -459,6 +472,7 @@ class ColourField(serializers.WritableField):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="filtering-page">
|
||||
|
||||
|
@ -186,11 +201,9 @@
|
|||
<li class="main"><a href="#third-party-packages">Third party packages</a></li>
|
||||
<li><a href="#django-rest-framework-chain">Django REST framework chain</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -355,15 +368,13 @@ class ProductFilter(django_filters.FilterSet):
|
|||
<p>This enables us to make queries like:</p>
|
||||
<pre class="prettyprint lang-py"><code>http://example.com/api/products?manufacturer__name=foo
|
||||
</code></pre>
|
||||
<p>This is nice, but it shows underlying model structure in REST API, which may
|
||||
be undesired, but you can use:</p>
|
||||
<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 class="prettyprint lang-py"><code>import django_filters
|
||||
from myapp.models import Product
|
||||
from myapp.serializers import ProductSerializer
|
||||
from rest_framework import generics
|
||||
|
||||
class ProductFilter(django_filters.FilterSet):
|
||||
|
||||
manufacturer = django_filters.CharFilter(name="manufacturer__name")
|
||||
|
||||
class Meta:
|
||||
|
@ -520,6 +531,7 @@ class ProductFilter(django_filters.FilterSet):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="format-suffixes-page">
|
||||
|
||||
|
@ -172,11 +187,9 @@
|
|||
<li><a href="#format_suffix_patterns">format_suffix_patterns</a></li>
|
||||
<li><a href="#accept-headers-vs-format-suffixes">Accept headers vs. format suffixes</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -251,6 +264,7 @@ def comment_list(request, format=None):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="generic-views-page">
|
||||
|
||||
|
@ -194,11 +209,9 @@
|
|||
<li class="main"><a href="#third-party-packages">Third party packages</a></li>
|
||||
<li><a href="#django-rest-framework-bulk">Django REST Framework bulk</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -475,6 +488,7 @@ class BaseRetrieveUpdateDestroyView(MultipleFieldLookupMixin,
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="pagination-page">
|
||||
|
||||
|
@ -178,11 +193,9 @@
|
|||
<li class="main"><a href="#third-party-packages">Third party packages</a></li>
|
||||
<li><a href="#drf-extensions">DRF-extensions</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -334,6 +347,7 @@ class CustomPaginationSerializer(pagination.BasePaginationSerializer):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="parsers-page">
|
||||
|
||||
|
@ -184,11 +199,9 @@
|
|||
<li><a href="#messagepack">MessagePack</a></li>
|
||||
<li><a href="#camelcase-json">CamelCase JSON</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -340,6 +353,7 @@ def parse(self, stream, media_type=None, parser_context=None):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="permissions-page">
|
||||
|
||||
|
@ -187,11 +202,9 @@
|
|||
<li><a href="#composed-permissions">Composed Permissions</a></li>
|
||||
<li><a href="#rest-condition">REST Condition</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -223,6 +236,9 @@ or if you override the <code>get_object</code> method on a generic view, then yo
|
|||
self.check_object_permissions(self.request, obj)
|
||||
return obj
|
||||
</code></pre>
|
||||
<h4 id="limitations-of-object-level-permissions">Limitations of object level permissions</h4>
|
||||
<p>For performance reasons the generic views will not automatically apply object level permissions to each instance in a queryset when returning a list of objects.</p>
|
||||
<p>Often when you're using object level permissions you'll also want to <a href="filtering">filter the queryset</a> appropriately, to ensure that users only have visibility onto instances that they are permitted to view.</p>
|
||||
<h2 id="setting-the-permission-policy">Setting the permission policy</h2>
|
||||
<p>The default permission policy may be set globally, using the <code>DEFAULT_PERMISSION_CLASSES</code> setting. For example.</p>
|
||||
<pre class="prettyprint lang-py"><code>REST_FRAMEWORK = {
|
||||
|
@ -383,6 +399,7 @@ class BlacklistPermission(permissions.BasePermission):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="relations-page">
|
||||
|
||||
|
@ -188,11 +203,9 @@
|
|||
<li class="main"><a href="#third-party-packages">Third Party Packages</a></li>
|
||||
<li><a href="#drf-nested-routers">DRF Nested Routers</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -584,6 +597,7 @@ In the 2.4 release, these parts of the API will be removed entirely.</p>
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="renderers-page">
|
||||
|
||||
|
@ -198,11 +213,9 @@
|
|||
<li><a href="#ultrajson">UltraJSON</a></li>
|
||||
<li><a href="#camelcase-json">CamelCase JSON</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -523,6 +536,7 @@ In this case you can underspecify the media types it should respond to, by using
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="requests-page">
|
||||
|
||||
|
@ -184,11 +199,9 @@
|
|||
<li><a href="#stream">.stream</a></li>
|
||||
<li class="main"><a href="#standard-httprequest-attributes">Standard HttpRequest attributes</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -282,6 +295,7 @@
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="responses-page">
|
||||
|
||||
|
@ -182,11 +197,9 @@
|
|||
<li class="main"><a href="#standard-httpresponse-attributes">Standard HttpResponse attributes</a></li>
|
||||
<li><a href="#render()">.render()</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -265,6 +278,7 @@ response['Cache-Control'] = 'no-cache'
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="reverse-page">
|
||||
|
||||
|
@ -172,11 +187,9 @@
|
|||
<li><a href="#reverse">reverse</a></li>
|
||||
<li><a href="#reverse_lazy">reverse_lazy</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -240,6 +253,7 @@ class APIRootView(APIView):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="routers-page">
|
||||
|
||||
|
@ -181,11 +196,9 @@
|
|||
<li><a href="#wqdb">wq.db</a></li>
|
||||
<li><a href="#drf-extensions">DRF-extensions</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -354,6 +367,7 @@ app.router.register_model(MyModel)
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="serializers-page">
|
||||
|
||||
|
@ -191,11 +206,9 @@
|
|||
<li><a href="#dynamically-modifying-fields">Dynamically modifying fields</a></li>
|
||||
<li><a href="#customising-the-default-fields">Customising the default fields</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -666,6 +679,7 @@ The <code>ModelSerializer</code> class lets you automatically create a Serialize
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="settings-page">
|
||||
|
||||
|
@ -180,11 +195,9 @@
|
|||
<li><a href="#view-names-and-descriptions">View names and descriptions</a></li>
|
||||
<li><a href="#miscellaneous-settings">Miscellaneous settings</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -438,6 +451,7 @@ If set to <code>None</code> then generic filtering is disabled.</p>
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="status-codes-page">
|
||||
|
||||
|
@ -176,11 +191,9 @@
|
|||
<li><a href="#server-error---5xx">Server Error - 5xx</a></li>
|
||||
<li><a href="#helper-functions">Helper functions</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -300,6 +313,7 @@ is_server_error() # 5xx
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="testing-page">
|
||||
|
||||
|
@ -186,11 +201,9 @@
|
|||
<li><a href="#setting-the-default-format">Setting the default format</a></li>
|
||||
<li><a href="#setting-the-available-formats">Setting the available formats</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -412,6 +425,7 @@ self.assertEqual(response.content, '{"username": "lauren", "id": 4}')
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="throttling-page">
|
||||
|
||||
|
@ -179,11 +194,9 @@
|
|||
<li class="main"><a href="#custom-throttles">Custom throttles</a></li>
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -344,6 +357,7 @@ class UploadView(APIView):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="views-page">
|
||||
|
||||
|
@ -177,11 +192,9 @@
|
|||
<li><a href="#@api_view()">@api_view()</a></li>
|
||||
<li><a href="#api-policy-decorators">API policy decorators</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -321,6 +334,7 @@ def view(request):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="viewsets-page">
|
||||
|
||||
|
@ -179,11 +194,9 @@
|
|||
<li class="main"><a href="#custom-viewset-base-classes">Custom ViewSet base classes</a></li>
|
||||
<li><a href="#example">Example</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -398,6 +411,7 @@ class UserViewSet(viewsets.ModelViewSet):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
28
index.html
28
index.html
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="index-page">
|
||||
|
||||
|
@ -181,12 +196,10 @@
|
|||
<li><a href="#security">Security</a></li>
|
||||
<li><a href="#license">License</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
<hr><p><strong>The team behind REST framework is launching a new API service.</strong></p>
|
||||
<p>If you want to be first in line when we start issuing invitations, please <a href="http://brightapi.com">sign up here</a>.</p>
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
<hr/>
|
||||
<script type="text/javascript" src="//cdn.fusionads.net/fusion.js?zoneid=1332&serve=C6SDP2Y&placement=djangorestframework" id="_fusionads_js"></script>
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -227,7 +240,7 @@
|
|||
<li><a href="api-guide/authentication">Authentication policies</a> including <a href="api-guide/authentication#oauthauthentication">OAuth1a</a> and <a href="api-guide/authentication#oauth2authentication">OAuth2</a> out of the box.</li>
|
||||
<li><a href="api-guide/serializers">Serialization</a> that supports both <a href="api-guide/serializers#modelserializer">ORM</a> and <a href="api-guide/serializers#serializers">non-ORM</a> data sources.</li>
|
||||
<li>Customizable all the way down - just use <a href="api-guide/views#function-based-views">regular function-based views</a> if you don't need the <a href="api-guide/generic-views">more</a> <a href="api-guide/viewsets">powerful</a> <a href="api-guide/routers">features</a>.</li>
|
||||
<li><a href=".">Extensive documentation</a>, <a href="https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework">great community support</a>, and a growing <a href="https://www.djangopackages.com/grids/g/django-rest-framework/">package ecosystem</a>.</li>
|
||||
<li><a href=".">Extensive documentation</a>, and <a href="https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework">great community support</a>.</li>
|
||||
<li>Used and trusted by large companies such as <a href="http://www.mozilla.org/en-US/about/">Mozilla</a> and <a href="https://www.eventbrite.co.uk/about/">Eventbrite</a>.</li>
|
||||
</ul>
|
||||
<hr />
|
||||
|
@ -431,6 +444,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="2.2-announcement-page">
|
||||
|
||||
|
@ -174,11 +189,9 @@
|
|||
<li><a href="#community">Community</a></li>
|
||||
<li><a href="#api-changes">API changes</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -311,6 +324,7 @@ serializer.data
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="2.3-announcement-page">
|
||||
|
||||
|
@ -186,11 +201,9 @@
|
|||
<li><a href="#version-22-api-changes">Version 2.2 API changes</a></li>
|
||||
<li><a href="#what-comes-next">What comes next?</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -404,6 +417,7 @@ urlpatterns = patterns('',
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="ajax-csrf-cors-page">
|
||||
|
||||
|
@ -173,11 +188,9 @@
|
|||
<li><a href="#csrf-protection">CSRF protection</a></li>
|
||||
<li><a href="#cors">CORS</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -224,6 +237,7 @@
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="browsable-api-page">
|
||||
|
||||
|
@ -173,11 +188,9 @@
|
|||
<li><a href="#formats">Formats</a></li>
|
||||
<li><a href="#customizing">Customizing</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -318,6 +331,7 @@ class BookSerializer(serializers.ModelSerializer):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="browser-enhancements-page">
|
||||
|
||||
|
@ -176,11 +191,9 @@
|
|||
<li><a href="#url-based-format-suffixes">URL based format suffixes</a></li>
|
||||
<li><a href="#doesnt-html5-support-put-and-delete-forms">Doesn't HTML5 support PUT and DELETE forms?</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -258,6 +271,7 @@ as well as how to support content types other than form-encoded data.</p>
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="contributing-page">
|
||||
|
||||
|
@ -185,11 +200,9 @@
|
|||
<li><a href="#getting-started">Getting started</a></li>
|
||||
<li><a href="#linking-to-your-package">Linking to your package</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -335,6 +348,7 @@ More text...
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="credits-page">
|
||||
|
||||
|
@ -172,11 +187,9 @@
|
|||
<li><a href="#additional-thanks">Additional thanks</a></li>
|
||||
<li><a href="#contact">Contact</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -397,6 +410,7 @@
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="documenting-your-api-page">
|
||||
|
||||
|
@ -173,11 +188,9 @@
|
|||
<li><a href="#self-describing-apis">Self describing APIs</a></li>
|
||||
<li><a href="#the-hypermedia-approach">The hypermedia approach</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -263,6 +276,7 @@
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="release-notes-page">
|
||||
|
||||
|
@ -181,11 +196,9 @@
|
|||
<li><a href="#02x-series">0.2.x series</a></li>
|
||||
<li><a href="#01x-series">0.1.x series</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -801,6 +814,7 @@
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="rest-framework-2-announcement-page">
|
||||
|
||||
|
@ -178,11 +193,9 @@
|
|||
<li><a href="#documentation">Documentation</a></li>
|
||||
<li><a href="#summary">Summary</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -259,6 +272,7 @@
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="rest-hypermedia-hateoas-page">
|
||||
|
||||
|
@ -173,11 +188,9 @@
|
|||
<li><a href="#what-rest-framework-provides">What REST framework provides.</a></li>
|
||||
<li><a href="#what-rest-framework-doesnt-provide">What REST framework doesn't provide.</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -227,6 +240,7 @@ the Design of Network-based Software Architectures</a>.</li>
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="writable-nested-serializers-page">
|
||||
|
||||
|
@ -171,11 +186,9 @@
|
|||
<li class="main"><a href="#writable-nested-serializers">Writable nested serializers</a></li>
|
||||
<li><a href="#one-to-many-data-structures">One-to-many data structures</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -235,6 +248,7 @@ class ToDoListSerializer(serializers.ModelSerializer):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="1-serialization-page">
|
||||
|
||||
|
@ -180,11 +195,9 @@
|
|||
<li><a href="#testing-our-first-attempt-at-a-web-api">Testing our first attempt at a Web API</a></li>
|
||||
<li><a href="#where-are-we-now">Where are we now</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -499,6 +512,7 @@ Quit the server with CONTROL-C.
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="2-requests-and-responses-page">
|
||||
|
||||
|
@ -178,11 +193,9 @@
|
|||
<li><a href="#hows-it-looking">How's it looking?</a></li>
|
||||
<li><a href="#whats-next">What's next?</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -338,6 +351,7 @@ curl -X POST http://127.0.0.1:8000/snippets/ -d '{"code": "print 456"}' -H "Cont
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="3-class-based-views-page">
|
||||
|
||||
|
@ -173,11 +188,9 @@
|
|||
<li><a href="#using-mixins">Using mixins</a></li>
|
||||
<li><a href="#using-generic-class-based-views">Using generic class based views</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -331,6 +344,7 @@ class SnippetDetail(generics.RetrieveUpdateDestroyAPIView):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="4-authentication-and-permissions-page">
|
||||
|
||||
|
@ -179,11 +194,9 @@
|
|||
<li><a href="#authenticating-with-the-api">Authenticating with the API</a></li>
|
||||
<li><a href="#summary">Summary</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -367,6 +380,7 @@ class IsOwnerOrReadOnly(permissions.BasePermission):
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="5-relationships-and-hyperlinked-apis-page">
|
||||
|
||||
|
@ -176,11 +191,9 @@
|
|||
<li><a href="#adding-pagination">Adding pagination</a></li>
|
||||
<li><a href="#browsing-the-api">Browsing the API</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -333,6 +346,7 @@ urlpatterns += patterns('',
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="6-viewsets-and-routers-page">
|
||||
|
||||
|
@ -176,11 +191,9 @@
|
|||
<li><a href="#reviewing-our-work">Reviewing our work</a></li>
|
||||
<li><a href="#onwards-and-upwards">Onwards and upwards</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -322,6 +335,7 @@ urlpatterns = patterns('',
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
})();
|
||||
|
||||
</script>
|
||||
<style>
|
||||
span.fusion-wrap a {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a.fusion-poweredby {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
div.promo {display: none;}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onload="prettyPrint()" class="quickstart-page">
|
||||
|
||||
|
@ -176,11 +191,9 @@
|
|||
<li><a href="#settings">Settings</a></li>
|
||||
<li><a href="#testing-our-api">Testing our API</a></li>
|
||||
|
||||
<div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="promo">
|
||||
|
||||
</div>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
@ -348,6 +361,7 @@ REST_FRAMEWORK = {
|
|||
<script src="http://www.django-rest-framework.org/js/jquery-1.8.1-min.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/prettify-1.0.js"></script>
|
||||
<script src="http://www.django-rest-framework.org/js/bootstrap-2.1.1-min.js"></script>
|
||||
|
||||
<script>
|
||||
//$('.side-nav').scrollspy()
|
||||
var shiftWindow = function() { scrollBy(0, -50) };
|
||||
|
|
Loading…
Reference in New Issue
Block a user