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
cb672a0e
Commit
cb672a0e
authored
Nov 13, 2014
by
Tom Christie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/tomchristie/django-rest-framework
parents
99233005
03310cc3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
5 deletions
+8
-5
README.md
+3
-0
rest_framework/exceptions.py
+2
-2
rest_framework/fields.py
+1
-1
rest_framework/utils/html.py
+2
-2
No files found.
README.md
View file @
cb672a0e
# Django REST framework
# Django REST framework
[
![build-status-image
]
]
[
travis
]
[
![build-status-image
]
]
[
travis
]
[
![pypi-version
]
]
[
pypi
]
**Awesome web-browseable Web APIs.**
**Awesome web-browseable Web APIs.**
...
@@ -181,6 +182,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
...
@@ -181,6 +182,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[
build-status-image
]:
https://secure.travis-ci.org/tomchristie/django-rest-framework.png?branch=master
[
build-status-image
]:
https://secure.travis-ci.org/tomchristie/django-rest-framework.png?branch=master
[
travis
]:
http://travis-ci.org/tomchristie/django-rest-framework?branch=master
[
travis
]:
http://travis-ci.org/tomchristie/django-rest-framework?branch=master
[
pypi-version
]:
https://pypip.in/version/djangorestframework/badge.svg
[
pypi
]:
https://pypi.python.org/pypi/djangorestframework
[
twitter
]:
https://twitter.com/_tomchristie
[
twitter
]:
https://twitter.com/_tomchristie
[
group
]:
https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework
[
group
]:
https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework
[
0.4
]:
https://github.com/tomchristie/django-rest-framework/tree/0.4.X
[
0.4
]:
https://github.com/tomchristie/django-rest-framework/tree/0.4.X
...
...
rest_framework/exceptions.py
View file @
cb672a0e
...
@@ -70,7 +70,7 @@ class MethodNotAllowed(APIException):
...
@@ -70,7 +70,7 @@ class MethodNotAllowed(APIException):
default_detail
=
"Method '
%
s' not allowed."
default_detail
=
"Method '
%
s' not allowed."
def
__init__
(
self
,
method
,
detail
=
None
):
def
__init__
(
self
,
method
,
detail
=
None
):
self
.
detail
=
(
detail
or
self
.
default_detail
)
%
method
self
.
detail
=
detail
or
(
self
.
default_detail
%
method
)
class
NotAcceptable
(
APIException
):
class
NotAcceptable
(
APIException
):
...
@@ -87,7 +87,7 @@ class UnsupportedMediaType(APIException):
...
@@ -87,7 +87,7 @@ class UnsupportedMediaType(APIException):
default_detail
=
"Unsupported media type '
%
s' in request."
default_detail
=
"Unsupported media type '
%
s' in request."
def
__init__
(
self
,
media_type
,
detail
=
None
):
def
__init__
(
self
,
media_type
,
detail
=
None
):
self
.
detail
=
(
detail
or
self
.
default_detail
)
%
media_type
self
.
detail
=
detail
or
(
self
.
default_detail
%
media_type
)
class
Throttled
(
APIException
):
class
Throttled
(
APIException
):
...
...
rest_framework/fields.py
View file @
cb672a0e
...
@@ -1106,7 +1106,7 @@ class HiddenField(Field):
...
@@ -1106,7 +1106,7 @@ class HiddenField(Field):
A hidden field does not take input from the user, or present any output,
A hidden field does not take input from the user, or present any output,
but it does populate a field in `validated_data`, based on its default
but it does populate a field in `validated_data`, based on its default
value. This is particularly useful when we have a `unique_for_date`
value. This is particularly useful when we have a `unique_for_date`
constrain on a pair of fields, as we need some way to include the date in
constrain
t
on a pair of fields, as we need some way to include the date in
the validated data.
the validated data.
"""
"""
def
__init__
(
self
,
**
kwargs
):
def
__init__
(
self
,
**
kwargs
):
...
...
rest_framework/utils/html.py
View file @
cb672a0e
...
@@ -36,7 +36,7 @@ def parse_html_list(dictionary, prefix=''):
...
@@ -36,7 +36,7 @@ def parse_html_list(dictionary, prefix=''):
'[0]foo': 'abc',
'[0]foo': 'abc',
'[0]bar': 'def',
'[0]bar': 'def',
'[1]foo': 'hij',
'[1]foo': 'hij',
'[
2
]bar': 'klm',
'[
1
]bar': 'klm',
}
}
-->
-->
[
[
...
@@ -72,7 +72,7 @@ def parse_html_dict(dictionary, prefix):
...
@@ -72,7 +72,7 @@ def parse_html_dict(dictionary, prefix):
-->
-->
{
{
'profile': {
'profile': {
'username': 'example,
'username': 'example
'
,
'email': 'example@example.com'
'email': 'example@example.com'
}
}
}
}
...
...
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