Leo's Technical Blog

Django on Jython: Status and Goals



Leo Soto

python, jython, django

Django on Jython: Status and Goals

Posted by Leo Soto on .

python, jython, django

Django on Jython: Status and Goals

Posted by Leo Soto on .

I've been silent lately, mainly because I've been very busy with my job (My role in the company changed, and you know, such changes tends to carry a bit of chaos).

Anyway, I'm convinced that the unresolved things in the Django+Jython integration aren't that hard, so is only matter of time (and/or manpower) to get them fixed.

So let's review my original short-term goals:

  1. The development server must run: Check (no reloading support yet).
  2. The admin application must run: Check. This means that that we got working templates, views, models and backend, for this limited but very important test case.
  3. The test suite must run: Well, it ran three weeks ago, but the lack of time.strptime on Jython caused the failure of one third of tests. Later, when applying a patch with a partial implementation of strptime, I got an obscure error from postgresql that killed the test suite (ERROR: failed to fetch new tuple for AFTER trigger [SQLCode: 0], [SQLState: XX000]). And now I'm getting unicode errors Update: Unicode errors fixed. They were caused by another unicode bug in Jython. So I'm again stuck with the PostgreSQL error.
    While fixing the test suite crashes, I want to state some new goals:

  4. Django must run inside a servlet container: Should be easy, thanks to modjy.

  5. No failures on the test suite: This one is hard. Therefore, I expect to break it into sub-objectives as needed
    Finally, if you want to play with Django on Jython without the pain of manually collecting and applying the necessary patches to both codebases, just download the modified sources using mercurial:
 $ hg clone https://hg.leosoto.com/django.jythonport
 $ hg clone https://hg.leosoto.com/jython.hacks