11 | | This document will get you up and running with Django on top of Jython. |
12 | | |
13 | | .. _jython: http://www.jython.org/ |
14 | | |
15 | | Installing Jython |
16 | | ================= |
17 | | |
18 | | Django works with Jython versions 2.5b3 and higher. Download Jython at |
19 | | http://www.jython.org/. |
20 | | |
21 | | Creating a servlet container |
22 | | ============================ |
23 | | |
24 | | If you just want to experiment with Django, skip ahead to the next section; |
25 | | Django includes a lightweight Web server you can use for testing, so you won't |
26 | | need to set up anything else until you're ready to deploy Django in production. |
27 | | |
28 | | If you want to use Django on a production site, use a Java servlet container, |
29 | | such as `Apache Tomcat`_. Full JavaEE applications servers such as `GlassFish`_ |
30 | | or `JBoss`_ are also OK, if you need the extra features they include. |
31 | | |
32 | | .. _`Apache Tomcat`: http://tomcat.apache.org/ |
33 | | .. _GlassFish: https://glassfish.java.net/ |
34 | | .. _JBoss: http://www.jboss.org/ |
35 | | |
36 | | Installing Django |
37 | | ================= |
38 | | |
39 | | The next step is to install Django itself. This is exactly the same as |
40 | | installing Django on standard Python, so see |
41 | | :ref:`removing-old-versions-of-django` and :ref:`install-django-code` for |
42 | | instructions. |
43 | | |
44 | | Installing Jython platform support libraries |
45 | | ============================================ |
46 | | |
47 | | The `django-jython`_ project contains database backends and management commands |
48 | | for Django/Jython development. Note that the builtin Django backends won't work |
49 | | on top of Jython. |
| 12 | The django-jython project is `seeking contributors`_ to help update its code for |
| 13 | newer versions of Django. You can select an older version of this documentation |
| 14 | to see the instructions we had for using Django with Jython. If django-jython |
| 15 | is updated and please `file a ticket`_ and we'll be happy to update our |
| 16 | documentation accordingly. |
52 | | |
53 | | To install it, follow the `installation instructions`_ detailed on the project |
54 | | Web site. Also, read the `database backends`_ documentation there. |
55 | | |
56 | | .. _`installation instructions`: http://code.google.com/p/django-jython/wiki/Install |
57 | | .. _`database backends`: http://code.google.com/p/django-jython/wiki/DatabaseBackends |
58 | | |
59 | | Differences with Django on Jython |
60 | | ================================= |
61 | | |
62 | | .. index:: JYTHONPATH |
63 | | |
64 | | At this point, Django on Jython should behave nearly identically to Django |
65 | | running on standard Python. However, are a few differences to keep in mind: |
66 | | |
67 | | * Remember to use the ``jython`` command instead of ``python``. The |
68 | | documentation uses ``python`` for consistency, but if you're using Jython |
69 | | you'll want to mentally replace ``python`` with ``jython`` every time it |
70 | | occurs. |
71 | | |
72 | | * Similarly, you'll need to use the ``JYTHONPATH`` environment variable |
73 | | instead of ``PYTHONPATH``. |
| 19 | .. _`seeking contributors`: https://groups.google.com/d/topic/django-jython-dev/oZpKucQpz7I/discussion |
| 20 | .. _`file a ticket`: https://code.djangoproject.com/newticket |