I did a little tinkering and now have django running with the CherryPy
3.0 WSGI server for local development. I was quite surprised how easy
this was to do, essentially replacing in core/management.py:

>>> from django.core.servers.basehttp import run
>>> run(addr, int(port), handler)

with:

>>> from cherrypy import wsgiserver
>>> server = wsgiserver.CherryPyWSGIServer((addr, int(port)), handler, 
>>> server_name=addr)
>>> server.start()

I also added the Paste translogging middleware to log to the console,
so now for local development with no observable changes, I can do:

# ./manage.py runcherrypy

The biggest benefit of this in my case is that CherryPy handles
concurrent requests properly, making certain types of AJAX tasks
possible to develop locally, where django's built in server blocks
concurrent requests.

It seems like the performance is worse, possibly due to the fact that
I'm still using static.serve a lot locally. But the utility is
certainly higher for heavy ajax development, and even quick and dirty
deployment.

So I thought I might share my experiment with everyone for discussion.

Do others see the utility in this? The patch is following, and I could
be prompted to submit it to trac...


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to