| [ Web Proxy ] |
| Viewing: https://wiki.python.org/moin/../python/platforms/../../jython/../jython/modules/DjangoOnJython.html | [Back] [Original] |
Legacy Wiki Page
This page was migrated from the old MoinMoin-based wiki. Information may be outdated or no longer applicable. For current documentation, see python.org.
Finally, Django works on Jython, without any special patching. Here are the steps to get Django on Jython running:
First, get a fresh version of Jython. Any release after 2.5.0 should work fine.
Check out and install Django 1.2.5.
$ svn co http://code.djangoproject.com/svn/django/trunk/ django $ cd django $ jython setup.py install
You may also like to make an alias for django-admin.py. Very useful if you also use Django with CPython:
$ alias django-admin-jy="jython /path/to/jython-dev/dist/bin/django-admin.py"
Download and install the latest release of django-jython:
$ wget http://django-jython.googlecode.com/files/django-jython-1.2.0b1.tar.gz $ tar xvfz django-jython-1.2.0b1.tar.gz $ cd django-jython-1.2.0b1 $ jython setup.py install
Start a project.
$ django-admin-jy startproject myproject
Edit myproject/settings.py and change the DATABASE_ENGINE to doj.backends.zxjdbc.postgresql.
At this point, you can follow the great Django documentation, remembering to use the jython25 command instead of python, and the JYTHONPATH variable instead of PYTHONPATH. Have fun!
See http://packages.python.org/django-jython/war-deployment.html
Seems like there is an issue with popen() on windows, which blocks the Django test suite. You can try skipping the offending test using these two patches (against Django 1.0.2), written by Victor Ng:
Update (03/04/11): Not sure if this is an issue any longer, please edit if you run into it using the latest versions
The Django-Jython 1.2.0b1 release is in beta as of 03/04/11. It should be compatible with Oracle, MySQL, and PostgreSQL. If you need to use MS SQL Server, you will still need to use Django version 1.1.x until otherwise noted.
Back to top2026, Python Software Foundation
Made with Sphinx and Shibuya theme.
| Web Proxy Viewer | New URL | Original Page |