Ticket #3357: threading.patch
File threading.patch, 2.1 KB (added by , 18 years ago) |
---|
-
django/conf/global_settings.py
113 113 EMAIL_HOST_USER = '' 114 114 EMAIL_HOST_PASSWORD = '' 115 115 116 # Whether to use a multi-threaded development server. 117 USE_MULTITHREADED_SERVER = False 118 116 119 # List of strings representing installed apps. 117 120 INSTALLED_APPS = () 118 121 -
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, HTTPServer 10 from django.conf import settings 11 from BaseHTTPServer import BaseHTTPRequestHandler 11 12 from types import ListType, StringType 12 13 import os, re, sys, time, urllib 13 14 15 if settings.USE_MULTITHREADED_SERVER: 16 # This creates a base HTTPServer class that supports multithreading 17 import BaseHTTPServer, SocketServer 18 class HTTPServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer): 19 def __init__(self, server_address, RequestHandlerClass=None): 20 BaseHTTPServer.HTTPServer.__init__(self, server_address, RequestHandlerClass) 21 else: 22 from BaseHTTPServer import HTTPServer 23 14 24 __version__ = "0.1" 15 25 __all__ = ['WSGIServer','WSGIRequestHandler','demo_app'] 16 26 -
docs/settings.txt
856 856 set to ``False``, Django will make some optimizations so as not to load the 857 857 internationalization machinery. 858 858 859 USE_MULTITHREADED_SERVER 860 ------------------------ 861 862 Default: ``False`` 863 864 A boolean that specifies whether Django's built-in development server 865 should run multi-threaded. Caution should be taken when setting this to 866 True so as to avoid multi-threading bugs in your views. 867 859 868 YEAR_MONTH_FORMAT 860 869 ----------------- 861 870