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
02e1f69d
Commit
02e1f69d
authored
Sep 28, 2015
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Django 1.9 support
parent
c4211ce7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
20 deletions
+27
-20
.travis.yml
+5
-6
README.md
+2
-2
docs/index.md
+2
-2
rest_framework/utils/field_mapping.py
+8
-0
tox.ini
+10
-10
No files found.
.travis.yml
View file @
02e1f69d
...
@@ -5,6 +5,9 @@ sudo: false
...
@@ -5,6 +5,9 @@ sudo: false
env
:
env
:
-
TOX_ENV=py27-lint
-
TOX_ENV=py27-lint
-
TOX_ENV=py27-docs
-
TOX_ENV=py27-docs
-
TOX_ENV=py35-django19
-
TOX_ENV=py34-django19
-
TOX_ENV=py27-django19
-
TOX_ENV=py34-django18
-
TOX_ENV=py34-django18
-
TOX_ENV=py33-django18
-
TOX_ENV=py33-django18
-
TOX_ENV=py32-django18
-
TOX_ENV=py32-django18
...
@@ -13,16 +16,12 @@ env:
...
@@ -13,16 +16,12 @@ env:
-
TOX_ENV=py33-django17
-
TOX_ENV=py33-django17
-
TOX_ENV=py32-django17
-
TOX_ENV=py32-django17
-
TOX_ENV=py27-django17
-
TOX_ENV=py27-django17
-
TOX_ENV=py27-djangomaster
-
TOX_ENV=py34-djangomaster
-
TOX_ENV=py35-djangomaster
matrix
:
matrix
:
# Python 3.5 not yet available on travis, watch this to see when it is.
fast_finish
:
true
fast_finish
:
true
allow_failures
:
allow_failures
:
-
env
:
TOX_ENV=py27-djangomaster
-
env
:
TOX_ENV=py35-django19
-
env
:
TOX_ENV=py34-djangomaster
-
env
:
TOX_ENV=py35-djangomaster
install
:
install
:
-
pip install tox
-
pip install tox
...
...
README.md
View file @
02e1f69d
...
@@ -36,8 +36,8 @@ There is a live example API for testing purposes, [available here][sandbox].
...
@@ -36,8 +36,8 @@ There is a live example API for testing purposes, [available here][sandbox].
# Requirements
# Requirements
*
Python (2.7, 3.2, 3.3, 3.4)
*
Python (2.7, 3.2, 3.3, 3.4
, 3.5
)
*
Django (1.7, 1.8)
*
Django (1.7, 1.8
, 1.9
)
# Installation
# Installation
...
...
docs/index.md
View file @
02e1f69d
...
@@ -52,8 +52,8 @@ Some reasons you might want to use REST framework:
...
@@ -52,8 +52,8 @@ Some reasons you might want to use REST framework:
REST framework requires the following:
REST framework requires the following:
*
Python (2.6.5+, 2.7, 3.2, 3.3, 3.4)
*
Python (2.6.5+, 2.7, 3.2, 3.3, 3.4
, 3.5
)
*
Django (1.
5.6+, 1.6.3+, 1.7+, 1.8
)
*
Django (1.
7+, 1.8, 1.9
)
The following packages are optional:
The following packages are optional:
...
...
rest_framework/utils/field_mapping.py
View file @
02e1f69d
...
@@ -112,6 +112,14 @@ def get_field_kwargs(field_name, model_field):
...
@@ -112,6 +112,14 @@ def get_field_kwargs(field_name, model_field):
kwargs
[
'choices'
]
=
model_field
.
choices
kwargs
[
'choices'
]
=
model_field
.
choices
return
kwargs
return
kwargs
# Our decimal validation is handled in the field code, not validator code.
# (In Django 1.9+ this differs from previous style)
if
isinstance
(
model_field
,
models
.
DecimalField
):
validator_kwarg
=
[
validator
for
validator
in
validator_kwarg
if
not
isinstance
(
validator
,
validators
.
DecimalValidator
)
]
# Ensure that max_length is passed explicitly as a keyword arg,
# Ensure that max_length is passed explicitly as a keyword arg,
# rather than as a validator.
# rather than as a validator.
max_length
=
getattr
(
model_field
,
'max_length'
,
None
)
max_length
=
getattr
(
model_field
,
'max_length'
,
None
)
...
...
tox.ini
View file @
02e1f69d
...
@@ -5,7 +5,7 @@ addopts=--tb=short
...
@@ -5,7 +5,7 @@ addopts=--tb=short
envlist
=
envlist
=
py27-{lint,docs},
py27-{lint,docs},
{py27,py32,py33,py34}-django{17,18},
{py27,py32,py33,py34}-django{17,18},
{py27,py34,py35}-django{
master
}
{py27,py34,py35}-django{
19
}
[testenv]
[testenv]
basepython
=
basepython
=
...
@@ -21,7 +21,7 @@ setenv =
...
@@ -21,7 +21,7 @@ setenv =
deps
=
deps
=
django17:
Django
=
=1.7.10 # Should track maximum supported
django17:
Django
=
=1.7.10 # Should track maximum supported
django18:
Django
=
=1.8.4 # Should track maximum supported
django18:
Django
=
=1.8.4 # Should track maximum supported
djangomaster:
https://github.com/django/django/archive/master.tar.gz
django19:
https://www.djangoproject.com/download/1.9a1/tarball/
-rrequirements/requirements-testing.txt
-rrequirements/requirements-testing.txt
-rrequirements/requirements-optionals.txt
-rrequirements/requirements-optionals.txt
...
@@ -37,24 +37,24 @@ deps =
...
@@ -37,24 +37,24 @@ deps =
-rrequirements/requirements-testing.txt
-rrequirements/requirements-testing.txt
-rrequirements/requirements-documentation.txt
-rrequirements/requirements-documentation.txt
# Specify explicitly to exclude Django Guardian against Django
master (various Pythons)
# Specify explicitly to exclude Django Guardian against Django
1.9
[testenv:py27-django
master
]
[testenv:py27-django
19
]
deps
=
deps
=
https://github.com/django/django/archive/master.tar.gz
https://www.djangoproject.com/download/1.9a1/tarball/
-rrequirements/requirements-testing.txt
-rrequirements/requirements-testing.txt
markdown
=
=2.5.2
markdown
=
=2.5.2
django-filter
=
=0.10.0
django-filter
=
=0.10.0
[testenv:py34-djangomaster]
[testenv:py34-django19]
deps
=
deps
=
https://github.com/django/django/archive/master.tar.gz
https://www.djangoproject.com/download/1.9a1/tarball/
-rrequirements/requirements-testing.txt
-rrequirements/requirements-testing.txt
markdown
=
=2.5.2
markdown
=
=2.5.2
django-filter
=
=0.10.0
django-filter
=
=0.10.0
[testenv:py35-django
master
]
[testenv:py35-django
19
]
deps
=
deps
=
https://github.com/django/django/archive/master.tar.gz
https://www.djangoproject.com/download/1.9a1/tarball/
-rrequirements/requirements-testing.txt
-rrequirements/requirements-testing.txt
markdown
=
=2.5.2
markdown
=
=2.5.2
django-filter
=
=0.10.0
django-filter
=
=0.10.0
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