summaryrefslogtreecommitdiff
path: root/django/core
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2013-05-10 12:55:30 +0100
committerAndrew Godwin <andrew@aeracode.org>2013-05-10 12:55:30 +0100
commitcb4b0de49e027f09f8abe63e2fa43f60fc1ef13f (patch)
tree712da07b2b80fc503aea683c096a8774dceaad01 /django/core
parentf6801a234fb9460eac80d146534ac340e178c466 (diff)
parentbdd285723f9b0044eca690634c412c1c3eec76c0 (diff)
Merge branch 'master' into schema-alteration
Diffstat (limited to 'django/core')
-rw-r--r--django/core/handlers/base.py4
-rw-r--r--django/core/handlers/wsgi.py1
-rw-r--r--django/core/management/commands/makemessages.py5
-rw-r--r--django/core/management/templates.py2
-rw-r--r--django/core/servers/basehttp.py2
5 files changed, 10 insertions, 4 deletions
diff --git a/django/core/handlers/base.py b/django/core/handlers/base.py
index 900ea8e6b7..acc74db6f5 100644
--- a/django/core/handlers/base.py
+++ b/django/core/handlers/base.py
@@ -237,7 +237,7 @@ def get_path_info(environ):
"""
path_info = environ.get('PATH_INFO', str('/'))
# Under Python 3, strings in environ are decoded with ISO-8859-1;
- # re-encode to recover the original bytestring provided by the webserver.
+ # re-encode to recover the original bytestring provided by the web server.
if six.PY3:
path_info = path_info.encode('iso-8859-1')
# It'd be better to implement URI-to-IRI decoding, see #19508.
@@ -266,7 +266,7 @@ def get_script_name(environ):
else:
script_name = environ.get('SCRIPT_NAME', str(''))
# Under Python 3, strings in environ are decoded with ISO-8859-1;
- # re-encode to recover the original bytestring provided by the webserver.
+ # re-encode to recover the original bytestring provided by the web server.
if six.PY3:
script_name = script_name.encode('iso-8859-1')
# It'd be better to implement URI-to-IRI decoding, see #19508.
diff --git a/django/core/handlers/wsgi.py b/django/core/handlers/wsgi.py
index 3c88aeac6d..c348c6c8da 100644
--- a/django/core/handlers/wsgi.py
+++ b/django/core/handlers/wsgi.py
@@ -57,6 +57,7 @@ STATUS_CODE_TEXT = {
415: 'UNSUPPORTED MEDIA TYPE',
416: 'REQUESTED RANGE NOT SATISFIABLE',
417: 'EXPECTATION FAILED',
+ 418: "I'M A TEAPOT",
422: 'UNPROCESSABLE ENTITY',
423: 'LOCKED',
424: 'FAILED DEPENDENCY',
diff --git a/django/core/management/commands/makemessages.py b/django/core/management/commands/makemessages.py
index a7e98173ac..bc171176c2 100644
--- a/django/core/management/commands/makemessages.py
+++ b/django/core/management/commands/makemessages.py
@@ -294,7 +294,10 @@ class Command(NoArgsCommand):
os.unlink(potfile)
for f in file_list:
- f.process(self, potfile, self.domain, self.keep_pot)
+ try:
+ f.process(self, potfile, self.domain, self.keep_pot)
+ except UnicodeDecodeError:
+ self.stdout.write("UnicodeDecodeError: skipped file %s in %s" % (f.file, f.dirpath))
return potfile
def find_files(self, root):
diff --git a/django/core/management/templates.py b/django/core/management/templates.py
index 0f45399109..893e5c95af 100644
--- a/django/core/management/templates.py
+++ b/django/core/management/templates.py
@@ -43,7 +43,7 @@ class TemplateCommand(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--template',
action='store', dest='template',
- help='The dotted import path to load the template from.'),
+ help='The path or URL to load the template from.'),
make_option('--extension', '-e', dest='extensions',
action='append', default=['py'],
help='The file extension(s) to render (default: "py"). '
diff --git a/django/core/servers/basehttp.py b/django/core/servers/basehttp.py
index d329221ce4..387da6b3cd 100644
--- a/django/core/servers/basehttp.py
+++ b/django/core/servers/basehttp.py
@@ -108,6 +108,8 @@ class ServerHandler(simple_server.ServerHandler, object):
class WSGIServer(simple_server.WSGIServer, object):
"""BaseHTTPServer that implements the Python WSGI protocol"""
+ request_queue_size = 10
+
def __init__(self, *args, **kwargs):
if kwargs.pop('ipv6', False):
self.address_family = socket.AF_INET6