diff options
| author | Tom Christie | 2015-03-23 11:34:01 +0000 | 
|---|---|---|
| committer | Tom Christie | 2015-03-23 11:34:01 +0000 | 
| commit | 5e96a1ddf17946595a22083b035f99418dd2cbd7 (patch) | |
| tree | 6f77e244f775547635492bc9e6a2e019a54b2c2b | |
| parent | 09d51ea4e256ed99421dc52cd6b4626e7172b667 (diff) | |
| download | django-rest-framework-5e96a1ddf17946595a22083b035f99418dd2cbd7.tar.bz2 | |
Update documentation
| -rw-r--r-- | api-guide/pagination/index.html | 2 | ||||
| -rw-r--r-- | api-guide/versioning/index.html | 8 | ||||
| -rw-r--r-- | topics/release-notes/index.html | 20 | ||||
| -rw-r--r-- | tutorial/5-relationships-and-hyperlinked-apis/index.html | 4 | 
4 files changed, 27 insertions, 7 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 diff --git a/topics/release-notes/index.html b/topics/release-notes/index.html index 5e0a86b9..0a077d43 100644 --- a/topics/release-notes/index.html +++ b/topics/release-notes/index.html @@ -411,8 +411,23 @@  </code></pre>  <hr />  <h2 id="30x-series">3.0.x series</h2> +<h3 id="311">3.1.1</h3> +<p><strong>Date</strong>: <a href="https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.1.1+Release%22">19th March 2015</a>.</p> +<ul> +<li><strong>Security fix</strong>: Escape tab switching cookie name in browsable API.</li> +<li>Display input forms in browsable API if <code>serializer_class</code> is used, even when <code>get_serializer</code> method does not exist on the view. (<a href="../../gh2743">#2743</a>)</li> +<li>Use a password input for the AuthTokenSerializer. (<a href="../../gh2741">#2741</a>)</li> +<li>Fix missing anchor closing tag after next button. (<a href="https://github.com/tomchristie/django-rest-framework/issues/2691">#2691</a>)</li> +<li>Fix <code>lookup_url_kwarg</code> handling in viewsets. (<a href="https://github.com/tomchristie/django-rest-framework/issues/2685">#2685</a>, <a href="https://github.com/tomchristie/django-rest-framework/issues/2591">#2591</a>)</li> +<li>Fix problem with imporing <code>rest_framework.views</code> in <code>apps.py</code> (<a href="https://github.com/tomchristie/django-rest-framework/issues/2678">#2678</a>)</li> +<li>LimitOffsetPagination raises <code>TypeError</code> if PAGE_SIZE not set (<a href="https://github.com/tomchristie/django-rest-framework/issues/2667">#2667</a>, <a href="https://github.com/tomchristie/django-rest-framework/issues/2700">#2700</a>)</li> +<li>German translation for <code>min_value</code> field error message references <code>max_value</code>. (<a href="https://github.com/tomchristie/django-rest-framework/issues/2645">#2645</a>)</li> +<li>Remove <code>MergeDict</code>. (<a href="https://github.com/tomchristie/django-rest-framework/issues/2640">#2640</a>)</li> +<li>Support serializing unsaved models with related fields. (<a href="https://github.com/tomchristie/django-rest-framework/issues/2637">#2637</a>, <a href="https://github.com/tomchristie/django-rest-framework/issues/2641">#2641</a>)</li> +<li>Allow blank/null on radio.html choices. (<a href="https://github.com/tomchristie/django-rest-framework/issues/2631">#2631</a>)</li> +</ul>  <h3 id="310">3.1.0</h3> -<p><strong>Date</strong>: [5th March 2015][3.1.0-milestone].</p> +<p><strong>Date</strong>: <a href="https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.1.0+Release%22">5th March 2015</a>.</p>  <p>For full details see the <a href="../3.1-announcement">3.1 release announcement</a>.</p>  <h3 id="305">3.0.5</h3>  <p><strong>Date</strong>: <a href="https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.0.5+Release%22">10th February 2015</a>.</p> @@ -507,7 +522,8 @@  <p><!-- 3.0.2 -->  <!-- 3.0.3 -->  <!-- 3.0.4 --> -<!-- 3.0.5 --></p> +<!-- 3.0.5 --> +<!-- 3.1.1 --></p>            </div>            <!--/span--> diff --git a/tutorial/5-relationships-and-hyperlinked-apis/index.html b/tutorial/5-relationships-and-hyperlinked-apis/index.html index 418c7851..6ac9f9c0 100644 --- a/tutorial/5-relationships-and-hyperlinked-apis/index.html +++ b/tutorial/5-relationships-and-hyperlinked-apis/index.html @@ -473,8 +473,10 @@ class UserSerializer(serializers.HyperlinkedModelSerializer):  <li>Our user serializer includes a field that refers to <code>'snippet-detail'</code>.</li>  <li>Our snippet and user serializers include <code>'url'</code> fields that by default will refer to <code>'{model_name}-detail'</code>, which in this case will be <code>'snippet-detail'</code> and <code>'user-detail'</code>.</li>  </ul> -<p>After adding all those names into our URLconf, our final <code>snippets/urls.py</code> file should look something like this:</p> +<p>After adding all those names into our URLconf, our final <code>snippets/urls.py</code> file should look like this:</p>  <pre><code>from django.conf.urls import url, include +from rest_framework.urlpatterns import format_suffix_patterns +from snippets import views  # API endpoints  urlpatterns = format_suffix_patterns([ | 
