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
aa3f844b
Commit
aa3f844b
authored
Jul 30, 2015
by
Tom Christie
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3199 from tomchristie/remove-url-from-future
Remove 'load url from future' tags in templates.
parents
f087dcf7
ed3f9593
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
6 additions
and
47 deletions
+6
-47
.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/templates/rest_framework/admin.html
+0
-1
rest_framework/templates/rest_framework/base.html
+0
-1
rest_framework/templates/rest_framework/login_base.html
+0
-1
rest_framework/test.py
+3
-3
tox.ini
+0
-1
No files found.
.travis.yml
View file @
aa3f844b
...
@@ -23,8 +23,6 @@ env:
...
@@ -23,8 +23,6 @@ env:
-
TOX_ENV=py32-django15
-
TOX_ENV=py32-django15
-
TOX_ENV=py27-django15
-
TOX_ENV=py27-django15
-
TOX_ENV=py26-django15
-
TOX_ENV=py26-django15
-
TOX_ENV=py27-django14
-
TOX_ENV=py26-django14
-
TOX_ENV=py27-djangomaster
-
TOX_ENV=py27-djangomaster
-
TOX_ENV=py32-djangomaster
-
TOX_ENV=py32-djangomaster
-
TOX_ENV=py33-djangomaster
-
TOX_ENV=py33-djangomaster
...
...
README.md
View file @
aa3f844b
...
@@ -36,7 +36,7 @@ There is a live example API for testing purposes, [available here][sandbox].
...
@@ -36,7 +36,7 @@ There is a live example API for testing purposes, [available here][sandbox].
# Requirements
# Requirements
*
Python (2.6.5+, 2.7, 3.2, 3.3, 3.4)
*
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
# Installation
...
...
docs/index.md
View file @
aa3f844b
...
@@ -53,7 +53,7 @@ Some reasons you might want to use REST framework:
...
@@ -53,7 +53,7 @@ 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)
*
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:
The following packages are optional:
...
...
docs/tutorial/1-serialization.md
View file @
aa3f844b
...
@@ -317,7 +317,7 @@ Quit out of the shell...
...
@@ -317,7 +317,7 @@ Quit out of the shell...
Validating models...
Validating models...
0 errors found
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/
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Quit the server with CONTROL-C.
...
...
rest_framework/compat.py
View file @
aa3f844b
...
@@ -203,41 +203,6 @@ if 'patch' not in View.http_method_names:
...
@@ -203,41 +203,6 @@ if 'patch' not in View.http_method_names:
View
.
http_method_names
=
View
.
http_method_names
+
[
'patch'
]
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
# Markdown is optional
try
:
try
:
import
markdown
import
markdown
...
...
rest_framework/templates/rest_framework/admin.html
View file @
aa3f844b
{% load url from future %}
{% load staticfiles %}
{% load staticfiles %}
{% load rest_framework %}
{% load rest_framework %}
<!DOCTYPE html>
<!DOCTYPE html>
...
...
rest_framework/templates/rest_framework/base.html
View file @
aa3f844b
{% load url from future %}
{% load staticfiles %}
{% load staticfiles %}
{% load rest_framework %}
{% load rest_framework %}
<!DOCTYPE html>
<!DOCTYPE html>
...
...
rest_framework/templates/rest_framework/login_base.html
View file @
aa3f844b
{% extends "rest_framework/base.html" %}
{% extends "rest_framework/base.html" %}
{% load url from future %}
{% load staticfiles %}
{% load staticfiles %}
{% load rest_framework %}
{% load rest_framework %}
...
...
rest_framework/test.py
View file @
aa3f844b
...
@@ -8,12 +8,12 @@ import django
...
@@ -8,12 +8,12 @@ import django
from
django.conf
import
settings
from
django.conf
import
settings
from
django.test
import
testcases
from
django.test
import
testcases
from
django.test.client
import
Client
as
DjangoClient
from
django.test.client
import
Client
as
DjangoClient
from
django.test.client
import
RequestFactory
as
DjangoRequestFactory
from
django.test.client
import
ClientHandler
from
django.test.client
import
ClientHandler
from
django.utils
import
six
from
django.utils
import
six
from
django.utils.encoding
import
force_bytes
from
django.utils.http
import
urlencode
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
from
rest_framework.settings
import
api_settings
...
@@ -47,7 +47,7 @@ class APIRequestFactory(DjangoRequestFactory):
...
@@ -47,7 +47,7 @@ class APIRequestFactory(DjangoRequestFactory):
if
content_type
:
if
content_type
:
# Content type specified explicitly, treat data as a raw bytestring
# 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
:
else
:
format
=
format
or
self
.
default_format
format
=
format
or
self
.
default_format
...
...
tox.ini
View file @
aa3f844b
...
@@ -13,7 +13,6 @@ commands = ./runtests.py --fast {posargs}
...
@@ -13,7 +13,6 @@ commands = ./runtests.py --fast {posargs}
setenv
=
setenv
=
PYTHONDONTWRITEBYTECODE
=
1
PYTHONDONTWRITEBYTECODE
=
1
deps
=
deps
=
django14:
Django
=
=1.4.11 # Should track minimum supported
django15:
Django
=
=1.5.6 # Should track minimum supported
django15:
Django
=
=1.5.6 # Should track minimum supported
django16:
Django
=
=1.6.3 # Should track minimum supported
django16:
Django
=
=1.6.3 # Should track minimum supported
django17:
Django
=
=1.7.8 # Should track maximum 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