This is the first of several blogs that I plan to publish regarding the use of experimental database backends with the Django-Jython project. In this series of blogs, I will cover the basics of how to begin using the experimental backends, as well as some details on how to create your own. At the time of this posting, only one "fully supported" backend exists for the Django-Jython project and that is for the PostgreSQL database. However, another experimental backend exists for SQLLite and there are more on the way.
In order to build and begin using the experimental backend for SQLLite (or others), you must first obtain a copy of the code, which is available on the project site, or via your command-line using the following line:
svn checkout http://django-jython.googlecode.com/svn/trunk/ django-jython-read-only
Once you've obtained the code, it is easy to build. Simply traverse into the root directory of the downloaded code which should be named "django-jython", and perform the build using the setup.py build script as such:
jython setup.py build
Now, this works nicely for a build to use the PostgreSQL backend, but it will not include the experimental backend implementations. In order to do so, you must open up the setup.py script and add the experimental backend that you wish to use within the "packages" listing as follows:
from distutils.core import setup
name = "django-jython",
version = "0.9",
packages = ['doj',
'doj.backends..zxjdbc.sqllite', # Experimental backend
Once you've added this to the setup.py script, it will cause the experimental code to be built the next time the build process is invoked. Now you can begin using the new backend.
Next time I plan to delve into the process of creating your own experimental backend for the Django-Jython project!