Ticket #3357: devserver_multithread_1.0.patch
File devserver_multithread_1.0.patch, 2.0 KB (added by , 16 years ago) |
---|
-
django/conf/global_settings.py
140 140 EMAIL_HOST_PASSWORD = '' 141 141 EMAIL_USE_TLS = False 142 142 143 # Whether to use a multi-threaded development server. 144 USE_MULTITHREADED_SERVER = False 145 143 146 # List of strings representing installed apps. 144 147 INSTALLED_APPS = () 145 148 -
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 14 14 import sys 15 15 import urllib 16 16 17 from django.conf import settings 18 if settings.USE_MULTITHREADED_SERVER: 19 # This creates a base HTTPServer class that supports multithreading 20 import BaseHTTPServer, SocketServer 21 class HTTPServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer): 22 def __init__(self, server_address, RequestHandlerClass=None): 23 BaseHTTPServer.HTTPServer.__init__(self, server_address, RequestHandlerClass) 24 else: 25 from BaseHTTPServer import HTTPServer 26 17 27 from django.utils.http import http_date 18 28 19 29 __version__ = "0.1" -
docs/ref/settings.txt
1195 1195 1196 1196 .. setting:: YEAR_MONTH_FORMAT 1197 1197 1198 USE_MULTITHREADED_SERVER 1199 ------------------------ 1200 1201 **New in Django development version** 1202 1203 Default: ``False`` 1204 1205 A boolean that specifies whether Django's built-in development server 1206 should run multi-threaded. Caution should be taken when setting this to 1207 True so as to avoid multi-threading bugs in your views. 1208 1198 1209 YEAR_MONTH_FORMAT 1199 1210 ----------------- 1200 1211