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
b749b950
Commit
b749b950
authored
Feb 15, 2011
by
tom christie tom@tomchristie.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added credits, fixed multipart forms and unicode output as per paul's bug reports.
parent
027ffed2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
2 deletions
+16
-2
CREDITS.txt
+4
-0
djangorestframework/modelresource.py
+1
-1
djangorestframework/parsers.py
+9
-0
djangorestframework/resource.py
+2
-1
No files found.
CREDITS.txt
0 → 100644
View file @
b749b950
Thanks to...
Jesper Noehr & the django-piston contributors for providing the starting point for this project.
Paul Bagwell - Suggestions & bugfixes.
djangorestframework/modelresource.py
View file @
b749b950
...
...
@@ -121,7 +121,7 @@ class ModelResource(Resource):
if
inspect
.
ismethod
(
f
)
and
len
(
inspect
.
getargspec
(
f
)[
0
])
==
1
:
ret
=
_any
(
f
())
else
:
ret
=
str
(
thing
)
# TRC TODO: Change this back!
ret
=
unicode
(
thing
)
# TRC TODO: Change this back!
return
ret
...
...
djangorestframework/parsers.py
View file @
b749b950
...
...
@@ -118,3 +118,12 @@ class FormParser(BaseParser):
return
data
# TODO: Allow parsers to specify multiple media types
class
MultipartParser
(
FormParser
):
"""The default parser for multipart form data.
Return a dict containing a single value for each non-reserved parameter.
"""
media_type
=
'multipart/form-data'
djangorestframework/resource.py
View file @
b749b950
...
...
@@ -42,7 +42,8 @@ class Resource(ParserMixin, FormValidatorMixin, OverloadedContentMixin, Overload
# List of content-types the resource can read from
parsers
=
(
parsers
.
JSONParser
,
parsers
.
XMLParser
,
parsers
.
FormParser
)
parsers
.
FormParser
,
parsers
.
MultipartParser
)
# List of all authenticating methods to attempt
authenticators
=
(
authenticators
.
UserLoggedInAuthenticator
,
...
...
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