From 09d51ea4e256ed99421dc52cd6b4626e7172b667 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 16 Mar 2015 12:55:10 +0000 Subject: Update documentation --- api-guide/pagination/index.html | 2 +- api-guide/testing/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'api-guide') diff --git a/api-guide/pagination/index.html b/api-guide/pagination/index.html index d9a3395a..6da6e135 100644 --- a/api-guide/pagination/index.html +++ b/api-guide/pagination/index.html @@ -539,7 +539,7 @@ class StandardResultsSetPagination(PageNumberPagination): }

Setup

-

To enable the PageNumberPagination style globally, use the following configuration:

+

To enable the LimitOffsetPagination style globally, use the following configuration:

REST_FRAMEWORK = {
     'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination'
 }
diff --git a/api-guide/testing/index.html b/api-guide/testing/index.html
index 19407551..0267d5f3 100644
--- a/api-guide/testing/index.html
+++ b/api-guide/testing/index.html
@@ -498,7 +498,7 @@ request = factory.put('/notes/547/', content, content_type=content_type)
 

Forcing authentication

When testing views directly using a request factory, it's often convenient to be able to directly authenticate the request, rather than having to construct the correct authentication credentials.

To forcibly authenticate a request, use the force_authenticate() method.

-
from rest_framework.tests import force_authenticate
+
from rest_framework.test import force_authenticate
 
 factory = APIRequestFactory()
 user = User.objects.get(username='olivia')
-- 
cgit v1.2.3