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
49f8e641
Commit
49f8e641
authored
Nov 22, 2012
by
Xavier Ordoquy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed python2.7 compat issue.
parent
43c9a1c4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
rest_framework/compat.py
+1
-1
rest_framework/tests/files.py
+1
-1
No files found.
rest_framework/compat.py
View file @
49f8e641
...
...
@@ -17,7 +17,7 @@ except:
# cStringIO only if it's available, otherwise StringIO
try
:
import
cStringIO
as
StringIO
import
cStringIO
.StringIO
as
StringIO
except
ImportError
:
from
six
import
StringIO
...
...
rest_framework/tests/files.py
View file @
49f8e641
...
...
@@ -29,7 +29,7 @@ class FileSerializerTests(TestCase):
def
test_create
(
self
):
now
=
datetime
.
datetime
.
now
()
file
=
StringIO
.
StringIO
(
'stuff'
)
file
=
StringIO
(
'stuff'
)
file
.
name
=
'stuff.txt'
file
.
size
=
file
.
len
serializer
=
UploadedFileSerializer
(
data
=
{
'created'
:
now
},
files
=
{
'file'
:
file
})
...
...
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