aboutsummaryrefslogtreecommitdiffstats
path: root/api-guide
diff options
context:
space:
mode:
authorTom Christie2014-07-15 15:02:49 +0100
committerTom Christie2014-07-15 15:02:49 +0100
commit77da335ce8ff3b475ac03794f6e2b782316ab9a9 (patch)
tree8ed86b7141fb69a67f5e9375bfaa86b66c91778a /api-guide
parenta1dd458116a8f2b2d9151ac3b47d2877cc4abb38 (diff)
downloaddjango-rest-framework-77da335ce8ff3b475ac03794f6e2b782316ab9a9.tar.bz2
Latest docs
Diffstat (limited to 'api-guide')
-rw-r--r--api-guide/authentication.html24
-rw-r--r--api-guide/content-negotiation.html24
-rw-r--r--api-guide/exceptions.html24
-rw-r--r--api-guide/fields.html24
-rw-r--r--api-guide/filtering.html28
-rw-r--r--api-guide/format-suffixes.html24
-rw-r--r--api-guide/generic-views.html24
-rw-r--r--api-guide/pagination.html24
-rw-r--r--api-guide/parsers.html24
-rw-r--r--api-guide/permissions.html27
-rw-r--r--api-guide/relations.html24
-rw-r--r--api-guide/renderers.html24
-rw-r--r--api-guide/requests.html24
-rw-r--r--api-guide/responses.html24
-rw-r--r--api-guide/reverse.html24
-rw-r--r--api-guide/routers.html24
-rw-r--r--api-guide/serializers.html24
-rw-r--r--api-guide/settings.html24
-rw-r--r--api-guide/status-codes.html24
-rw-r--r--api-guide/testing.html24
-rw-r--r--api-guide/throttling.html24
-rw-r--r--api-guide/views.html24
-rw-r--r--api-guide/viewsets.html24
23 files changed, 441 insertions, 118 deletions
diff --git a/api-guide/authentication.html b/api-guide/authentication.html
index 89091469..bc61cdd2 100644
--- a/api-guide/authentication.html
+++ b/api-guide/authentication.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="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) };
diff --git a/api-guide/content-negotiation.html b/api-guide/content-negotiation.html
index c9b21cbe..db159e54 100644
--- a/api-guide/content-negotiation.html
+++ b/api-guide/content-negotiation.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="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) };
diff --git a/api-guide/exceptions.html b/api-guide/exceptions.html
index db3d1180..2a2cc10d 100644
--- a/api-guide/exceptions.html
+++ b/api-guide/exceptions.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="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) };
diff --git a/api-guide/fields.html b/api-guide/fields.html
index 49e356e7..ea762351 100644
--- a/api-guide/fields.html
+++ b/api-guide/fields.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="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) };
diff --git a/api-guide/filtering.html b/api-guide/filtering.html
index 76b18e00..741be369 100644
--- a/api-guide/filtering.html
+++ b/api-guide/filtering.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="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) };
diff --git a/api-guide/format-suffixes.html b/api-guide/format-suffixes.html
index 8e256e4a..47fcdc0f 100644
--- a/api-guide/format-suffixes.html
+++ b/api-guide/format-suffixes.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="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) };
diff --git a/api-guide/generic-views.html b/api-guide/generic-views.html
index 03a70c6c..d02d70de 100644
--- a/api-guide/generic-views.html
+++ b/api-guide/generic-views.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="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) };
diff --git a/api-guide/pagination.html b/api-guide/pagination.html
index c83a78ee..9ff95a14 100644
--- a/api-guide/pagination.html
+++ b/api-guide/pagination.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="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) };
diff --git a/api-guide/parsers.html b/api-guide/parsers.html
index c171eff9..c4c7ae63 100644
--- a/api-guide/parsers.html
+++ b/api-guide/parsers.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="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) };
diff --git a/api-guide/permissions.html b/api-guide/permissions.html
index 5422ae35..d60b143b 100644
--- a/api-guide/permissions.html
+++ b/api-guide/permissions.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="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) };
diff --git a/api-guide/relations.html b/api-guide/relations.html
index 35a7854d..5793b150 100644
--- a/api-guide/relations.html
+++ b/api-guide/relations.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="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) };
diff --git a/api-guide/renderers.html b/api-guide/renderers.html
index 75b8aee5..f7691952 100644
--- a/api-guide/renderers.html
+++ b/api-guide/renderers.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="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) };
diff --git a/api-guide/requests.html b/api-guide/requests.html
index 0bff2635..588e6ba4 100644
--- a/api-guide/requests.html
+++ b/api-guide/requests.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="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) };
diff --git a/api-guide/responses.html b/api-guide/responses.html
index 8aa50d53..52f8b223 100644
--- a/api-guide/responses.html
+++ b/api-guide/responses.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="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) };
diff --git a/api-guide/reverse.html b/api-guide/reverse.html
index 8e0e287d..d26f8956 100644
--- a/api-guide/reverse.html
+++ b/api-guide/reverse.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="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) };
diff --git a/api-guide/routers.html b/api-guide/routers.html
index 03568f2b..a0614330 100644
--- a/api-guide/routers.html
+++ b/api-guide/routers.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="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) };
diff --git a/api-guide/serializers.html b/api-guide/serializers.html
index ae5b2c36..89688c33 100644
--- a/api-guide/serializers.html
+++ b/api-guide/serializers.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="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) };
diff --git a/api-guide/settings.html b/api-guide/settings.html
index b436bd99..6e7d067f 100644
--- a/api-guide/settings.html
+++ b/api-guide/settings.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="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) };
diff --git a/api-guide/status-codes.html b/api-guide/status-codes.html
index eb584f89..c5e0c669 100644
--- a/api-guide/status-codes.html
+++ b/api-guide/status-codes.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="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) };
diff --git a/api-guide/testing.html b/api-guide/testing.html
index 74789fcb..78107f73 100644
--- a/api-guide/testing.html
+++ b/api-guide/testing.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="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) };
diff --git a/api-guide/throttling.html b/api-guide/throttling.html
index d22d0b70..4057039c 100644
--- a/api-guide/throttling.html
+++ b/api-guide/throttling.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="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) };
diff --git a/api-guide/views.html b/api-guide/views.html
index c8519b84..6f8cbc78 100644
--- a/api-guide/views.html
+++ b/api-guide/views.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="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) };
diff --git a/api-guide/viewsets.html b/api-guide/viewsets.html
index 73536a1d..e0c62bbb 100644
--- a/api-guide/viewsets.html
+++ b/api-guide/viewsets.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="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) };