Skip to content

Commit

Permalink
docs: Specify DRF fields in the serializer example
Browse files Browse the repository at this point in the history
New syntax as of DRF 3.3.x
  • Loading branch information
kinabalu authored and jleclanche committed Apr 5, 2017
1 parent 1e12fe4 commit cb5b231
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/rest-framework/getting_started.rst
Expand Up @@ -62,11 +62,13 @@ Here's our project's root `urls.py` module:
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ("username", "email", "first_name", "last_name", )
class GroupSerializer(serializers.ModelSerializer):
class Meta:
model = Group
fields = ("name", )
# ViewSets define the view behavior.
Expand Down

0 comments on commit cb5b231

Please sign in to comment.