Ticket #3357: threading.3.patch
File threading.3.patch, 2.0 KB (added by , 17 years ago) |
---|
-
./django/conf/global_settings.py
old new 133 133 EMAIL_HOST_PASSWORD = '' 134 134 EMAIL_USE_TLS = False 135 135 136 # Whether to use a multi-threaded development server. 137 USE_MULTITHREADED_SERVER = False 138 136 139 # List of strings representing installed apps. 137 140 INSTALLED_APPS = () 138 141 -
./django/core/servers/basehttp.py
old new 7 7 been reviewed for security issues. Don't use it for production use. 8 8 """ 9 9 10 from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer 10 from django.conf import settings 11 from BaseHTTPServer import BaseHTTPRequestHandler 11 12 import mimetypes 12 13 import os 13 14 import re … … 16 17 17 18 from django.utils.http import http_date 18 19 20 if settings.USE_MULTITHREADED_SERVER: 21 # This creates a base HTTPServer class that supports multithreading 22 import BaseHTTPServer, SocketServer 23 class HTTPServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer): 24 def __init__(self, server_address, RequestHandlerClass=None): 25 BaseHTTPServer.HTTPServer.__init__(self, server_address, RequestHandlerClass) 26 else: 27 from BaseHTTPServer import HTTPServer 28 19 29 __version__ = "0.1" 20 30 __all__ = ['WSGIServer','WSGIRequestHandler','demo_app'] 21 31 -
./docs/settings.txt
old new 1117 1117 set to ``False``, Django will make some optimizations so as not to load the 1118 1118 internationalization machinery. 1119 1119 1120 USE_MULTITHREADED_SERVER 1121 ------------------------ 1122 1123 **New in Django development version** 1124 1125 Default: ``False`` 1126 1127 A boolean that specifies whether Django's built-in development server 1128 should run multi-threaded. Caution should be taken when setting this to 1129 True so as to avoid multi-threading bugs in your views. 1130 1120 1131 YEAR_MONTH_FORMAT 1121 1132 ----------------- 1122 1133