Ticket #3357: devserver_multithread_trunk_r9532.patch
File devserver_multithread_trunk_r9532.patch, 2.0 KB (added by , 16 years ago) |
---|
-
django/conf/global_settings.py
142 142 EMAIL_HOST_PASSWORD = '' 143 143 EMAIL_USE_TLS = False 144 144 145 # Whether to use a multi-threaded development server. 146 USE_MULTITHREADED_SERVER = False 147 145 148 # List of strings representing installed apps. 146 149 INSTALLED_APPS = () 147 150 -
django/core/servers/basehttp.py
7 7 been reviewed for security issues. Don't use it for production use. 8 8 """ 9 9 10 from BaseHTTPServer import BaseHTTPRequestHandler , HTTPServer10 from BaseHTTPServer import BaseHTTPRequestHandler 11 11 import mimetypes 12 12 import os 13 13 import re … … 15 15 import sys 16 16 import urllib 17 17 18 from django.conf import settings 19 if settings.USE_MULTITHREADED_SERVER: 20 # This creates a base HTTPServer class that supports multithreading 21 import BaseHTTPServer, SocketServer 22 class HTTPServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer): 23 def __init__(self, server_address, RequestHandlerClass=None): 24 BaseHTTPServer.HTTPServer.__init__(self, server_address, RequestHandlerClass) 25 else: 26 from BaseHTTPServer import HTTPServer 27 18 28 from django.utils.http import http_date 19 29 20 30 __version__ = "0.1" -
docs/ref/settings.txt
1203 1203 1204 1204 .. setting:: YEAR_MONTH_FORMAT 1205 1205 1206 USE_MULTITHREADED_SERVER 1207 ------------------------ 1208 1209 **New in Django development version** 1210 1211 Default: ``False`` 1212 1213 A boolean that specifies whether Django's built-in development server 1214 should run multi-threaded. Caution should be taken when setting this to 1215 True so as to avoid multi-threading bugs in your views. 1216 1206 1217 YEAR_MONTH_FORMAT 1207 1218 ----------------- 1208 1219