Skip to content

Commit cb672a0

Browse files
committed
2 parents 9923300 + 03310cc commit cb672a0

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Django REST framework
22

33
[![build-status-image]][travis]
4+
[![pypi-version]][pypi]
45

56
**Awesome web-browseable Web APIs.**
67

@@ -181,6 +182,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
181182

182183
[build-status-image]: https://secure.travis-ci.org/tomchristie/django-rest-framework.png?branch=master
183184
[travis]: http://travis-ci.org/tomchristie/django-rest-framework?branch=master
185+
[pypi-version]: https://pypip.in/version/djangorestframework/badge.svg
186+
[pypi]: https://pypi.python.org/pypi/djangorestframework
184187
[twitter]: https://twitter.com/_tomchristie
185188
[group]: https://groups.google.com/forum/?fromgroups#!forum/django-rest-framework
186189
[0.4]: https://github.com/tomchristie/django-rest-framework/tree/0.4.X

rest_framework/exceptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class MethodNotAllowed(APIException):
7070
default_detail = "Method '%s' not allowed."
7171

7272
def __init__(self, method, detail=None):
73-
self.detail = (detail or self.default_detail) % method
73+
self.detail = detail or (self.default_detail % method)
7474

7575

7676
class NotAcceptable(APIException):
@@ -87,7 +87,7 @@ class UnsupportedMediaType(APIException):
8787
default_detail = "Unsupported media type '%s' in request."
8888

8989
def __init__(self, media_type, detail=None):
90-
self.detail = (detail or self.default_detail) % media_type
90+
self.detail = detail or (self.default_detail % media_type)
9191

9292

9393
class Throttled(APIException):

rest_framework/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ class HiddenField(Field):
11061106
A hidden field does not take input from the user, or present any output,
11071107
but it does populate a field in `validated_data`, based on its default
11081108
value. This is particularly useful when we have a `unique_for_date`
1109-
constrain on a pair of fields, as we need some way to include the date in
1109+
constraint on a pair of fields, as we need some way to include the date in
11101110
the validated data.
11111111
"""
11121112
def __init__(self, **kwargs):

rest_framework/utils/html.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def parse_html_list(dictionary, prefix=''):
3636
'[0]foo': 'abc',
3737
'[0]bar': 'def',
3838
'[1]foo': 'hij',
39-
'[2]bar': 'klm',
39+
'[1]bar': 'klm',
4040
}
4141
-->
4242
[
@@ -72,7 +72,7 @@ def parse_html_dict(dictionary, prefix):
7272
-->
7373
{
7474
'profile': {
75-
'username': 'example,
75+
'username': 'example',
7676
'email': '[email protected]'
7777
}
7878
}

0 commit comments

Comments
 (0)