mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Merge branch 'master' of https://github.com/tomchristie/django-rest-framework
This commit is contained in:
commit
cb672a0ecb
|
@ -1,6 +1,7 @@
|
|||
# Django REST framework
|
||||
|
||||
[![build-status-image]][travis]
|
||||
[![pypi-version]][pypi]
|
||||
|
||||
**Awesome web-browseable Web APIs.**
|
||||
|
||||
|
@ -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
|
||||
[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
|
||||
[group]: https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework
|
||||
[0.4]: https://github.com/tomchristie/django-rest-framework/tree/0.4.X
|
||||
|
|
|
@ -70,7 +70,7 @@ class MethodNotAllowed(APIException):
|
|||
default_detail = "Method '%s' not allowed."
|
||||
|
||||
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):
|
||||
|
@ -87,7 +87,7 @@ class UnsupportedMediaType(APIException):
|
|||
default_detail = "Unsupported media type '%s' in request."
|
||||
|
||||
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):
|
||||
|
|
|
@ -1106,7 +1106,7 @@ class HiddenField(Field):
|
|||
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
|
||||
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
|
||||
constraint on a pair of fields, as we need some way to include the date in
|
||||
the validated data.
|
||||
"""
|
||||
def __init__(self, **kwargs):
|
||||
|
|
|
@ -36,7 +36,7 @@ def parse_html_list(dictionary, prefix=''):
|
|||
'[0]foo': 'abc',
|
||||
'[0]bar': 'def',
|
||||
'[1]foo': 'hij',
|
||||
'[2]bar': 'klm',
|
||||
'[1]bar': 'klm',
|
||||
}
|
||||
-->
|
||||
[
|
||||
|
@ -72,7 +72,7 @@ def parse_html_dict(dictionary, prefix):
|
|||
-->
|
||||
{
|
||||
'profile': {
|
||||
'username': 'example,
|
||||
'username': 'example',
|
||||
'email': 'example@example.com'
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user