Commit b0c370dd by Tom Christie

Fixed couple of incorrect imports in the docs

parent 52a2ff8f
...@@ -28,7 +28,7 @@ Has the same behavior as [`django.core.urlresolvers.reverse`][reverse], except t ...@@ -28,7 +28,7 @@ Has the same behavior as [`django.core.urlresolvers.reverse`][reverse], except t
You should **include the request as a keyword argument** to the function, for example: You should **include the request as a keyword argument** to the function, for example:
import datetime import datetime
from rest_framework.utils import reverse from rest_framework.reverse import reverse
from rest_framework.views import APIView from rest_framework.views import APIView
class APIRootView(APIView): class APIRootView(APIView):
......
...@@ -94,7 +94,7 @@ The `Serializer` class is itself a type of `Field`, and can be used to represent ...@@ -94,7 +94,7 @@ The `Serializer` class is itself a type of `Field`, and can be used to represent
class CommentSerializer(serializers.Serializer): class CommentSerializer(serializers.Serializer):
user = serializers.UserSerializer() user = UserSerializer()
title = serializers.CharField() title = serializers.CharField()
content = serializers.CharField(max_length=200) content = serializers.CharField(max_length=200)
created = serializers.DateTimeField() created = serializers.DateTimeField()
......
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