Account Options

  1. Sign in
Google Groups Home
« Groups Home
Message from discussion Django with CherryPy 3.0
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Istvan Albert  
View profile  
 More options Jan 22 2007, 11:56 am
From: "Istvan Albert" <istvan.alb...@gmail.com>
Date: Mon, 22 Jan 2007 16:56:48 -0000
Local: Mon, Jan 22 2007 11:56 am
Subject: Re: Django with CherryPy 3.0
There is an easy way to turn on multi-threading for the default server,
see the diff below:

Index: basehttp.py

===================================================================

--- basehttp.py (revision 4183)

+++ basehttp.py (working copy)

@@ -7,10 +7,16 @@

 been reviewed for security issues. Don't use it for production use.
 """

-from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
+from BaseHTTPServer import BaseHTTPRequestHandler
 from types import ListType, StringType
 import os, re, sys, time, urllib

+import BaseHTTPServer, SocketServer
+class HTTPServer(SocketServer.ThreadingMixIn,
BaseHTTPServer.HTTPServer):
+    def __init__(self, server_address, RequestHandlerClass=None):
+        BaseHTTPServer.HTTPServer.__init__(self, server_address,
RequestHandlerClass )
+        print '*** MixinHTTPServer ***'
+
 __version__ = "0.1"
 __all__ = ['WSGIServer','WSGIRequestHandler','demo_app']


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.