From ad501d41f5db7267e1a4484d0afcafe9ba24800e Mon Sep 17 00:00:00 2001 From: Didi Hoffmann Date: Mon, 31 Jul 2017 14:50:36 +0200 Subject: [PATCH 1/2] Added the django user model So it is possible to copy paste the example and it will work out of the box. --- docs/api-guide/views.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-guide/views.md b/docs/api-guide/views.md index c0c4f67e4..abf5351c7 100644 --- a/docs/api-guide/views.md +++ b/docs/api-guide/views.md @@ -19,10 +19,10 @@ REST framework provides an `APIView` class, which subclasses Django's `View` cla Using the `APIView` class is pretty much the same as using a regular `View` class, as usual, the incoming request is dispatched to an appropriate handler method such as `.get()` or `.post()`. Additionally, a number of attributes may be set on the class that control various aspects of the API policy. For example: - from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import authentication, permissions + from django.contrib.auth.models import User class ListUsers(APIView): """ From 1368d3677ccf8756f771696dff04eb721819171e Mon Sep 17 00:00:00 2001 From: Didi Hoffmann Date: Mon, 31 Jul 2017 15:00:26 +0200 Subject: [PATCH 2/2] Added the separator line back Accidentally also deleted a line. --- docs/api-guide/views.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/api-guide/views.md b/docs/api-guide/views.md index abf5351c7..4fa36d0fc 100644 --- a/docs/api-guide/views.md +++ b/docs/api-guide/views.md @@ -19,6 +19,7 @@ REST framework provides an `APIView` class, which subclasses Django's `View` cla Using the `APIView` class is pretty much the same as using a regular `View` class, as usual, the incoming request is dispatched to an appropriate handler method such as `.get()` or `.post()`. Additionally, a number of attributes may be set on the class that control various aspects of the API policy. For example: + from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import authentication, permissions