Fixed couple of incorrect imports in the docs

This commit is contained in:
Tom Christie 2012-10-09 17:36:03 +01:00
parent 52a2ff8f77
commit b0c370dd2b
2 changed files with 2 additions and 2 deletions

View File

@ -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):

View File

@ -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()