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
4e262773
Commit
4e262773
authored
Nov 07, 2014
by
Tom Christie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into dont-deserialize-twice
parents
041435f4
1c1c6640
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
MANIFEST.in
+1
-1
rest_framework/serializers.py
+5
-1
No files found.
MANIFEST.in
View file @
4e262773
recursive-include rest_framework/static *.js *.css *.png
recursive-include rest_framework/static *.js *.css *.png
*.eot *.svg *.ttf *.woff
recursive-include rest_framework/templates *.html
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
rest_framework/serializers.py
View file @
4e262773
...
...
@@ -230,7 +230,11 @@ class Serializer(BaseSerializer):
def
get_initial
(
self
):
if
self
.
_initial_data
is
not
None
:
return
self
.
to_representation
(
self
.
_initial_data
)
return
ReturnDict
([
(
field_name
,
field
.
get_value
(
self
.
_initial_data
))
for
field_name
,
field
in
self
.
fields
.
items
()
if
field
.
get_value
(
self
.
_initial_data
)
is
not
empty
],
serializer
=
self
)
return
ReturnDict
([
(
field
.
field_name
,
field
.
get_initial
())
...
...
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