mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-09 08:00:52 +03:00
Add missing import to tutorial. Fixes #599
This commit is contained in:
parent
42fcc3599c
commit
2c76212e54
|
@ -54,6 +54,8 @@ You might also want to create a few different users, to use for testing the API.
|
|||
|
||||
Now that we've got some users to work with, we'd better add representations of those users to our API. Creating a new serializer is easy:
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
class UserSerializer(serializers.ModelSerializer):
|
||||
snippets = serializers.ManyPrimaryKeyRelatedField()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user