aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Christie2013-04-03 09:21:04 +0100
committerTom Christie2013-04-03 09:21:04 +0100
commita18d3df0f60ac4d5ad981b2d463f8408b44286ff (patch)
tree8d6e881587a83fa843141a3f6cd84040dbd43e88
parent74fbd5ccc5b2aa2f0aab25ead5ffa36024079fcf (diff)
parent5ed70324273d8093335f21155975267b22a641d2 (diff)
downloaddjango-rest-framework-a18d3df0f60ac4d5ad981b2d463f8408b44286ff.tar.bz2
Merge branch 'master' of https://github.com/tomchristie/django-rest-framework
-rwxr-xr-x[-rw-r--r--]docs/api-guide/generic-views.md2
-rwxr-xr-x[-rw-r--r--]docs/api-guide/serializers.md2
-rw-r--r--docs/topics/credits.md2
-rw-r--r--rest_framework/templatetags/rest_framework.py2
4 files changed, 5 insertions, 3 deletions
diff --git a/docs/api-guide/generic-views.md b/docs/api-guide/generic-views.md
index 20f1be63..cef9a9d4 100644..100755
--- 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
index 1a3c3431..2797b5f5 100644..100755
--- 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:
diff --git a/docs/topics/credits.md b/docs/topics/credits.md
index 7dd9cd2c..6edf347e 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
diff --git a/rest_framework/templatetags/rest_framework.py b/rest_framework/templatetags/rest_framework.py
index b6ab2de3..1d7a499f 100644
--- a/rest_framework/templatetags/rest_framework.py
+++ b/rest_framework/templatetags/rest_framework.py
@@ -181,7 +181,7 @@ TRAILING_PUNCTUATION = ['.', ',', ':', ';', '.)', '"', "'"]
WRAPPING_PUNCTUATION = [('(', ')'), ('<', '>'), ('[', ']'), ('&lt;', '&gt;'),
('"', '"'), ("'", "'")]
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+$')