Sunday, May 11, 2008

And CherryPy Looks to be the Winner

So I've been looking for a pure Python lightweight HTTP server for serving up a small django app.

Here are the steps I used (assuming Django is already installed however you installed it) for Ubuntu Hardy LTS:

1) Install CherryPy 3.x (I installed the python-cherrypy3 package)

2) Get DjangoCerise and follow the docs. Documentation and these wrapper scripts were the make or break difference.

3) Increase number of threads in th e SERVER_THREADS file. My crude app worked fine but the django admin interface was a bit sluggish.

While it properly daemonizes (possibly because I screwed up the scripts) shutdown wasn't working for me and (quite obviously, in hindsight) unless you run the startup scripts as root (which I will be) once this app qoes into "production" it won't properly set the user to nobody.

Saturday, May 10, 2008

From Aspen to Karrigell and

Been struggling to get Aspen working with Django. My app works fine, still having issues with "static" apps, which are necessary for the media directory and I ran across two framworks I hadn't seen before.

The first was Karrigell

Karrigell is a flexible Python web framework, with a clear and intuitive syntax. It is independant from any database, ORM or templating engine, and lets the programmer choose between a variety of coding styles

The package includes a powerful built-in web server, so there's no need to download, install and configure a separate one, and a pure-Python database engine, PyDbLite, which is used for the demos

and another was which is so barebones it is not worth quoting the website.

I doubt I'll use either of these, in particular I'm not sure the point of using a web framework unless there is an ORM?