aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorTom Christie2012-11-01 23:11:28 +0000
committerTom Christie2012-11-01 23:11:28 +0000
commit36e21153fbc60579c49e46c3f6488ff7bcb1f6ff (patch)
tree86097abd5482538c7c026dd233566026b6e6bcad /docs
parentd327c5f531b341ad980d20454211b02b87f34d0e (diff)
parent600289a8153eb70542551bab00d59fb7ff0065f0 (diff)
downloaddjango-rest-framework-36e21153fbc60579c49e46c3f6488ff7bcb1f6ff.tar.bz2
Merge master
Diffstat (limited to 'docs')
-rw-r--r--docs/api-guide/authentication.md6
-rw-r--r--docs/api-guide/throttling.md6
-rw-r--r--docs/topics/credits.md2
-rw-r--r--docs/tutorial/3-class-based-views.md4
4 files changed, 10 insertions, 8 deletions
diff --git a/docs/api-guide/authentication.md b/docs/api-guide/authentication.md
index 889d16c0..3137b9d4 100644
--- a/docs/api-guide/authentication.md
+++ b/docs/api-guide/authentication.md
@@ -30,7 +30,7 @@ The default authentication policy may be set globally, using the `DEFAULT_AUTHEN
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
- 'rest_framework.authentication.UserBasicAuthentication',
+ 'rest_framework.authentication.BasicAuthentication',
'rest_framework.authentication.SessionAuthentication',
)
}
@@ -38,7 +38,7 @@ The default authentication policy may be set globally, using the `DEFAULT_AUTHEN
You can also set the authentication policy on a per-view basis, using the `APIView` class based views.
class ExampleView(APIView):
- authentication_classes = (SessionAuthentication, UserBasicAuthentication)
+ authentication_classes = (SessionAuthentication, BasicAuthentication)
permission_classes = (IsAuthenticated,)
def get(self, request, format=None):
@@ -51,7 +51,7 @@ You can also set the authentication policy on a per-view basis, using the `APIVi
Or, if you're using the `@api_view` decorator with function based views.
@api_view(['GET'])
- @authentication_classes((SessionAuthentication, UserBasicAuthentication))
+ @authentication_classes((SessionAuthentication, BasicAuthentication))
@permissions_classes((IsAuthenticated,))
def example_view(request, format=None):
content = {
diff --git a/docs/api-guide/throttling.md b/docs/api-guide/throttling.md
index bfda7079..b03bc9e0 100644
--- a/docs/api-guide/throttling.md
+++ b/docs/api-guide/throttling.md
@@ -31,8 +31,8 @@ The default throttling policy may be set globally, using the `DEFAULT_THROTTLE_C
REST_FRAMEWORK = {
'DEFAULT_THROTTLE_CLASSES': (
- 'rest_framework.throttles.AnonThrottle',
- 'rest_framework.throttles.UserThrottle'
+ 'rest_framework.throttling.AnonRateThrottle',
+ 'rest_framework.throttling.UserRateThrottle'
),
'DEFAULT_THROTTLE_RATES': {
'anon': '100/day',
@@ -136,7 +136,7 @@ For example, given the following views...
REST_FRAMEWORK = {
'DEFAULT_THROTTLE_CLASSES': (
- 'rest_framework.throttles.ScopedRateThrottle'
+ 'rest_framework.throttling.ScopedRateThrottle'
),
'DEFAULT_THROTTLE_RATES': {
'contacts': '1000/day',
diff --git a/docs/topics/credits.md b/docs/topics/credits.md
index a74f7983..df022341 100644
--- a/docs/topics/credits.md
+++ b/docs/topics/credits.md
@@ -52,6 +52,7 @@ The following people have helped make REST framework great.
* Madis Väin - [madisvain]
* Stephan Groß - [minddust]
* Pavel Savchenko - [asfaltboy]
+* Otto Yiu - [ottoyiu]
Many thanks to everyone who's contributed to the project.
@@ -139,3 +140,4 @@ To contact the author directly:
[madisvain]: https://github.com/madisvain
[minddust]: https://github.com/minddust
[asfaltboy]: https://github.com/asfaltboy
+[ottoyiu]: https://github.com/OttoYiu
diff --git a/docs/tutorial/3-class-based-views.md b/docs/tutorial/3-class-based-views.md
index a31dccb2..91ef4038 100644
--- a/docs/tutorial/3-class-based-views.md
+++ b/docs/tutorial/3-class-based-views.md
@@ -92,7 +92,7 @@ Let's take a look at how we can compose our views by using the mixin classes.
class SnippetList(mixins.ListModelMixin,
mixins.CreateModelMixin,
- generics.MultipleObjectBaseView):
+ generics.MultipleObjectAPIView):
model = Snippet
serializer_class = SnippetSerializer
@@ -102,7 +102,7 @@ Let's take a look at how we can compose our views by using the mixin classes.
def post(self, request, *args, **kwargs):
return self.create(request, *args, **kwargs)
-We'll take a moment to examine exactly what's happening here - We're building our view using `MultipleObjectBaseView`, and adding in `ListModelMixin` and `CreateModelMixin`.
+We'll take a moment to examine exactly what's happening here - We're building our view using `MultipleObjectAPIView`, and adding in `ListModelMixin` and `CreateModelMixin`.
The base class provides the core functionality, and the mixin classes provide the `.list()` and `.create()` actions. We're then explicitly binding the `get` and `post` methods to the appropriate actions. Simple enough stuff so far.