From 216e9bfe95b3cf9ff9bfdb6f46bd772c655a879b Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Tue, 9 Oct 2012 17:36:27 +0100 Subject: [PATCH] Fix couple of incorrect imports in the docs --- api-guide/reverse.html | 2 +- api-guide/serializers.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api-guide/reverse.html b/api-guide/reverse.html index d3ca448f6..e9dbdce53 100644 --- a/api-guide/reverse.html +++ b/api-guide/reverse.html @@ -142,7 +142,7 @@

Has the same behavior as django.core.urlresolvers.reverse, except that it returns a fully qualified URL, using the request to determine the host and port.

You should include the request as a keyword argument to the function, for example:

import datetime
-from rest_framework.utils import reverse
+from rest_framework.reverse import reverse
 from rest_framework.views import APIView
 
 class APIRootView(APIView):
diff --git a/api-guide/serializers.html b/api-guide/serializers.html
index cf7dda5f6..7ffb47274 100644
--- a/api-guide/serializers.html
+++ b/api-guide/serializers.html
@@ -206,7 +206,7 @@ where some of the attributes of an object might not be simple datatypes such as
         return User(**attrs)
 
 class CommentSerializer(serializers.Serializer):
-    user = serializers.UserSerializer()
+    user = UserSerializer()
     title = serializers.CharField()
     content = serializers.CharField(max_length=200)
     created = serializers.DateTimeField()