mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-12-04 07:24:03 +03:00
Fix couple of incorrect imports in the docs
This commit is contained in:
parent
63f9fe8062
commit
216e9bfe95
|
@ -142,7 +142,7 @@
|
|||
<p>Has the same behavior as <a href="https://docs.djangoproject.com/en/dev/topics/http/urls/#reverse"><code>django.core.urlresolvers.reverse</code></a>, except that it returns a fully qualified URL, using the request to determine the host and port.</p>
|
||||
<p>You should <strong>include the request as a keyword argument</strong> to the function, for example:</p>
|
||||
<pre class="prettyprint lang-py"><code>import datetime
|
||||
from rest_framework.utils import reverse
|
||||
from rest_framework.reverse import reverse
|
||||
from rest_framework.views import APIView
|
||||
|
||||
class APIRootView(APIView):
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user