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
c8ad0cce
Commit
c8ad0cce
authored
Jul 30, 2015
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bump minimum Django version to 1.5
parent
5b39d820
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
6 additions
and
50 deletions
+6
-50
.travis.yml
+0
-2
README.md
+1
-1
docs/index.md
+1
-1
docs/tutorial/1-serialization.md
+1
-1
rest_framework/compat.py
+0
-35
rest_framework/request.py
+0
-1
rest_framework/serializers.py
+0
-2
rest_framework/test.py
+3
-3
rest_framework/views.py
+0
-3
tox.ini
+0
-1
No files found.
.travis.yml
View file @
c8ad0cce
...
...
@@ -23,8 +23,6 @@ env:
-
TOX_ENV=py32-django15
-
TOX_ENV=py27-django15
-
TOX_ENV=py26-django15
-
TOX_ENV=py27-django14
-
TOX_ENV=py26-django14
-
TOX_ENV=py27-djangomaster
-
TOX_ENV=py32-djangomaster
-
TOX_ENV=py33-djangomaster
...
...
README.md
View file @
c8ad0cce
...
...
@@ -36,7 +36,7 @@ There is a live example API for testing purposes, [available here][sandbox].
# Requirements
*
Python (2.6.5+, 2.7, 3.2, 3.3, 3.4)
*
Django (1.
4.11+, 1.
5.6+, 1.6.3+, 1.7, 1.8)
*
Django (1.5.6+, 1.6.3+, 1.7, 1.8)
# Installation
...
...
docs/index.md
View file @
c8ad0cce
...
...
@@ -53,7 +53,7 @@ Some reasons you might want to use REST framework:
REST framework requires the following:
*
Python (2.6.5+, 2.7, 3.2, 3.3, 3.4)
*
Django (1.
4.11+, 1.
5.6+, 1.6.3+, 1.7+, 1.8)
*
Django (1.5.6+, 1.6.3+, 1.7+, 1.8)
The following packages are optional:
...
...
docs/tutorial/1-serialization.md
View file @
c8ad0cce
...
...
@@ -317,7 +317,7 @@ Quit out of the shell...
Validating models...
0 errors found
Django version 1.
4
.3, using settings 'tutorial.settings'
Django version 1.
8
.3, using settings 'tutorial.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
...
...
rest_framework/compat.py
View file @
c8ad0cce
...
...
@@ -203,41 +203,6 @@ if 'patch' not in View.http_method_names:
View
.
http_method_names
=
View
.
http_method_names
+
[
'patch'
]
try
:
# In 1.5 the test client uses force_bytes
from
django.utils.encoding
import
force_bytes
as
force_bytes_or_smart_bytes
except
ImportError
:
# In 1.4 the test client just uses smart_str
from
django.utils.encoding
import
smart_str
as
force_bytes_or_smart_bytes
# RequestFactory only provides `generic` from 1.5 onwards
if
django
.
VERSION
>=
(
1
,
5
):
from
django.test.client
import
RequestFactory
else
:
from
django.test.client
import
RequestFactory
as
DjangoRequestFactory
class
RequestFactory
(
DjangoRequestFactory
):
def
generic
(
self
,
method
,
path
,
data
=
''
,
content_type
=
'application/octet-stream'
,
**
extra
):
parsed
=
_urlparse
(
path
)
data
=
force_bytes_or_smart_bytes
(
data
,
settings
.
DEFAULT_CHARSET
)
r
=
{
'PATH_INFO'
:
self
.
_get_path
(
parsed
),
'QUERY_STRING'
:
force_text
(
parsed
[
4
]),
'REQUEST_METHOD'
:
six
.
text_type
(
method
),
}
if
data
:
r
.
update
({
'CONTENT_LENGTH'
:
len
(
data
),
'CONTENT_TYPE'
:
six
.
text_type
(
content_type
),
'wsgi.input'
:
FakePayload
(
data
),
})
r
.
update
(
extra
)
return
self
.
request
(
**
r
)
# Markdown is optional
try
:
import
markdown
...
...
rest_framework/request.py
View file @
c8ad0cce
...
...
@@ -11,7 +11,6 @@ The wrapped request then offers a richer API, in particular :
from
__future__
import
unicode_literals
import
sys
import
warnings
from
django.conf
import
settings
from
django.http
import
QueryDict
...
...
rest_framework/serializers.py
View file @
c8ad0cce
...
...
@@ -12,8 +12,6 @@ response content is handled by parsers and renderers.
"""
from
__future__
import
unicode_literals
import
warnings
from
django.db
import
models
from
django.db.models.fields
import
Field
as
DjangoModelField
from
django.db.models.fields
import
FieldDoesNotExist
...
...
rest_framework/test.py
View file @
c8ad0cce
...
...
@@ -8,12 +8,12 @@ import django
from
django.conf
import
settings
from
django.test
import
testcases
from
django.test.client
import
Client
as
DjangoClient
from
django.test.client
import
RequestFactory
as
DjangoRequestFactory
from
django.test.client
import
ClientHandler
from
django.utils
import
six
from
django.utils.encoding
import
force_bytes
from
django.utils.http
import
urlencode
from
rest_framework.compat
import
RequestFactory
as
DjangoRequestFactory
from
rest_framework.compat
import
force_bytes_or_smart_bytes
from
rest_framework.settings
import
api_settings
...
...
@@ -47,7 +47,7 @@ class APIRequestFactory(DjangoRequestFactory):
if
content_type
:
# Content type specified explicitly, treat data as a raw bytestring
ret
=
force_bytes
_or_smart_bytes
(
data
,
settings
.
DEFAULT_CHARSET
)
ret
=
force_bytes
(
data
,
settings
.
DEFAULT_CHARSET
)
else
:
format
=
format
or
self
.
default_format
...
...
rest_framework/views.py
View file @
c8ad0cce
...
...
@@ -3,9 +3,6 @@ Provides an APIView class that is the base of all views in REST framework.
"""
from
__future__
import
unicode_literals
import
inspect
import
warnings
from
django.core.exceptions
import
PermissionDenied
from
django.db
import
models
from
django.http
import
Http404
...
...
tox.ini
View file @
c8ad0cce
...
...
@@ -13,7 +13,6 @@ commands = ./runtests.py --fast {posargs}
setenv
=
PYTHONDONTWRITEBYTECODE
=
1
deps
=
django14:
Django
=
=1.4.11 # Should track minimum supported
django15:
Django
=
=1.5.6 # Should track minimum supported
django16:
Django
=
=1.6.3 # Should track minimum supported
django17:
Django
=
=1.7.8 # Should track maximum supported
...
...
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