Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
90311357
Commit
90311357
authored
Sep 26, 2014
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Release notes
parent
e8af73d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
docs/topics/3.0-announcement.md
+2
-2
No files found.
docs/topics/3.0-announcement.md
View file @
90311357
...
@@ -137,13 +137,13 @@ For instance, given the following example model:
...
@@ -137,13 +137,13 @@ For instance, given the following example model:
rating = models.IntegerField()
rating = models.IntegerField()
created_by = models.ForeignKey(User)
created_by = models.ForeignKey(User)
Let's create a simple
`ModelSerializer`
class c.
Let's create a simple
`ModelSerializer`
class c
orresponding to the
`LocationRating`
model
.
class LocationRatingSerializer(serializer.ModelSerializer):
class LocationRatingSerializer(serializer.ModelSerializer):
class Meta:
class Meta:
model = LocationRating
model = LocationRating
We can now inspect
its
representation in the Django shell, using
`python manage.py shell`
...
We can now inspect
the serializer
representation in the Django shell, using
`python manage.py shell`
...
>>> serializer = LocationRatingSerializer()
>>> serializer = LocationRatingSerializer()
>>> print(serializer) # Or use `print serializer` in Python 2.x
>>> print(serializer) # Or use `print serializer` in Python 2.x
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment