views:

163

answers:

2

I'm looking for a super easy way to deploy django application on windows.

Basically my plan is to set up any python web server with my app on it and the boundle everything together using py2exe into a single executable.

I've tried using cherrypy however the newest (3.1.2) server doesn't work with Windows XP with Nod32 antivirus installed.

So I decided to give a try to Twisted. I've only found Django On Twisted but it seams to be quite old (2008) and it use twistd command which is a bit hard to pack into single executable.

Has anyone got a working snipped or good source of info?

A: 

I would rather suggest Portable LightTPD (i.e. the .zip) and Portable Python. It is very easy to set up LightTPD for FastCGI, and very easy to set up sqlite and FastCGI with Django in the Portable Python distro. This is probably your fastest and simplest route to getting an easily-deployable Django app going. If you aren't using it already, you probably want the Django book to help speed things along.

Instant Django has Python 2.6.2 integrated, so perhaps that would serve your needs better.

cjrh
The portable python has too old version 2.6.1 (I need some of the bugfixes from 2.6.2)
Piotr Czapla
A: 

I've found quite nice blog entry describing how to run django on twisted trunk.

Here is an example that merge twisted with django app into one file so it can be used from file created by py2exe:

# bootstrap your django instance

from django.core.handlers.wsgi import WSGIHandler
application = WSGIHandler()

import sys
sys.argv += '-no web --wsgi=<module_name>.application --port=8081'.split() 

from twisted.scripts.twistd import run
run()
Piotr Czapla