From 33ce7dfac4c9279ad6035d520a421cc7d77ffae5 Mon Sep 17 00:00:00 2001 From: Victor Shih Date: Sat, 30 Mar 2013 20:28:27 -0700 Subject: [PATCH 1/3] Spelling/grammar fixes. --- docs/api-guide/generic-views.md | 2 +- docs/api-guide/serializers.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 docs/api-guide/generic-views.md mode change 100644 => 100755 docs/api-guide/serializers.md diff --git a/docs/api-guide/generic-views.md b/docs/api-guide/generic-views.md old mode 100644 new mode 100755 index 20f1be63a..cef9a9d44 --- a/docs/api-guide/generic-views.md +++ b/docs/api-guide/generic-views.md @@ -200,7 +200,7 @@ Should be mixed in with any [GenericAPIView]. Provides a `.retrieve(request, *args, **kwargs)` method, that implements returning an existing model instance in a response. -If an object can be retrieve this returns a `200 OK` response, with a serialized representation of the object as the body of the response. Otherwise it will return a `404 Not Found`. +If an object can be retrieved this returns a `200 OK` response, with a serialized representation of the object as the body of the response. Otherwise it will return a `404 Not Found`. Should be mixed in with [SingleObjectAPIView]. diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md old mode 100644 new mode 100755 index 1a3c3431b..2797b5f5e --- a/docs/api-guide/serializers.md +++ b/docs/api-guide/serializers.md @@ -353,7 +353,7 @@ The `depth` option should be set to an integer value that indicates the depth of ## Specifying which fields should be read-only -You may wish to specify multiple fields as read-only. Instead of adding each field explicitely with the `read_only=True` attribute, you may use the `read_only_fields` Meta option, like so: +You may wish to specify multiple fields as read-only. Instead of adding each field explicitly with the `read_only=True` attribute, you may use the `read_only_fields` Meta option, like so: class AccountSerializer(serializers.ModelSerializer): class Meta: From 7d7c03eb2464110c281ce35e5cc73f02c349068d Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 1 Apr 2013 17:09:36 +0200 Subject: [PATCH 2/3] Added @vshih for docs fixes in #769. Thanks! --- docs/topics/credits.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/topics/credits.md b/docs/topics/credits.md index 7dd9cd2c0..6edf347e8 100644 --- a/docs/topics/credits.md +++ b/docs/topics/credits.md @@ -113,6 +113,7 @@ The following people have helped make REST framework great. * Pierre Dulac - [dulaccc] * Dave Kuhn - [kuhnza] * Sitong Peng - [stoneg] +* Victor Shih - [vshih] Many thanks to everyone who's contributed to the project. @@ -260,3 +261,4 @@ You can also contact [@_tomchristie][twitter] directly on twitter. [dulaccc]: https://github.com/dulaccc [kuhnza]: https://github.com/kuhnza [stoneg]: https://github.com/stoneg +[vshih]: https://github.com/vshih From 76d1c47905680fafa32596d1dda8d9ae20827acf Mon Sep 17 00:00:00 2001 From: glic3rinu Date: Mon, 1 Apr 2013 20:15:05 +0200 Subject: [PATCH 3/3] Fixed IPv6 support for urlize_quoted_links --- rest_framework/templatetags/rest_framework.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/templatetags/rest_framework.py b/rest_framework/templatetags/rest_framework.py index b6ab2de31..1d7a499fb 100644 --- a/rest_framework/templatetags/rest_framework.py +++ b/rest_framework/templatetags/rest_framework.py @@ -181,7 +181,7 @@ TRAILING_PUNCTUATION = ['.', ',', ':', ';', '.)', '"', "'"] WRAPPING_PUNCTUATION = [('(', ')'), ('<', '>'), ('[', ']'), ('<', '>'), ('"', '"'), ("'", "'")] word_split_re = re.compile(r'(\s+)') -simple_url_re = re.compile(r'^https?://\w', re.IGNORECASE) +simple_url_re = re.compile(r'^https?://\[?\w', re.IGNORECASE) simple_url_2_re = re.compile(r'^www\.|^(?!http)\w[^@]+\.(com|edu|gov|int|mil|net|org)$', re.IGNORECASE) simple_email_re = re.compile(r'^\S+@\S+\.\S+$')