Commit ad501d41 by Didi Hoffmann Committed by GitHub

Added the django user model

So it is possible to copy paste the example and it will work out of the box.
parent 3eade5ab
...@@ -19,10 +19,10 @@ REST framework provides an `APIView` class, which subclasses Django's `View` cla ...@@ -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. 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: For example:
from rest_framework.views import APIView from rest_framework.views import APIView
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework import authentication, permissions from rest_framework import authentication, permissions
from django.contrib.auth.models import User
class ListUsers(APIView): class ListUsers(APIView):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment