diff options
Diffstat (limited to 'api-guide')
| -rw-r--r-- | api-guide/pagination/index.html | 2 | ||||
| -rw-r--r-- | api-guide/versioning/index.html | 8 | 
2 files changed, 6 insertions, 4 deletions
| diff --git a/api-guide/pagination/index.html b/api-guide/pagination/index.html index 6da6e135..b51d7610 100644 --- a/api-guide/pagination/index.html +++ b/api-guide/pagination/index.html @@ -589,7 +589,7 @@ class StandardResultsSetPagination(PageNumberPagination):  <p>The <code>CursorPagination</code> class includes a number of attributes that may be overridden to modify the pagination style.</p>  <p>To set these attributes you should override the <code>CursorPagination</code> class, and then enable your custom pagination class as above.</p>  <ul> -<li><code>page_size</code> = A numeric value indicating the page size. If set, this overrides the <code>DEFAULT_PAGE_SIZE</code> setting. Defaults to the same value as the <code>DEFAULT_PAGE_SIZE</code> settings key.</li> +<li><code>page_size</code> = A numeric value indicating the page size. If set, this overrides the <code>PAGE_SIZE</code> setting. Defaults to the same value as the <code>PAGE_SIZE</code> settings key.</li>  <li><code>cursor_query_param</code> = A string value indicating the name of the "cursor" query parameter. Defaults to <code>'cursor'</code>.</li>  <li><code>ordering</code> = This should be a string, or list of strings, indicating the field against which the cursor based pagination will be applied. For example: <code>ordering = 'slug'</code>. Defaults to <code>-created</code>. This value may also be overridden by using <code>OrderingFilter</code> on the view.</li>  <li><code>template</code> = The name of a template to use when rendering pagination controls in the browsable API. May be overridden to modify the rendering style, or set to <code>None</code> to disable HTML pagination controls completely. Defaults to <code>"rest_framework/pagination/previous_and_next.html"</code>.</li> diff --git a/api-guide/versioning/index.html b/api-guide/versioning/index.html index 8a29d0ea..b42aecc7 100644 --- a/api-guide/versioning/index.html +++ b/api-guide/versioning/index.html @@ -370,7 +370,7 @@                      </li>                      <li> -                      <a href="#urlparameterversioning">URLParameterVersioning</a> +                      <a href="#urlpathversioning">URLPathVersioning</a>                      </li>                      <li> @@ -436,7 +436,9 @@  </code></pre>  <h4 id="reversing-urls-for-versioned-apis">Reversing URLs for versioned APIs</h4>  <p>The <code>reverse</code> function included by REST framework ties in with the versioning scheme. You need to make sure to include the current <code>request</code> as a keyword argument, like so.</p> -<pre><code>reverse('bookings-list', request=request) +<pre><code>from rest_framework.reverse import reverse + +reverse('bookings-list', request=request)  </code></pre>  <p>The above function will apply any URL transformations appropriate to the request version. For example:</p>  <ul> @@ -490,7 +492,7 @@ Accept: application/json; version=1.0  Host: example.com  Accept: application/vnd.megacorp.bookings+json; version=1.0  </code></pre> -<h2 id="urlparameterversioning">URLParameterVersioning</h2> +<h2 id="urlpathversioning">URLPathVersioning</h2>  <p>This scheme requires the client to specify the version as part of the URL path.</p>  <pre><code>GET /v1/bookings/ HTTP/1.1  Host: example.com | 
