Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Jython with Django?

Tags:

python

jython

I am planning to use Jython with Django. I want to know how stable the Jython project is, how easy to use it is, and how large its developer community is.

like image 379
Nitin Garg Avatar asked Feb 01 '10 19:02

Nitin Garg


People also ask

Can you use Java with Django?

If you want to use Django on a production site, use a Java servlet container, such as Apache Tomcat. Full JavaEE applications servers such as GlassFish or JBoss are also OK, if you need the extra features they include.

What can I do with Jython?

Interactive experimentation - Jython provides an interactive interpreter that can be used to interact with Java packages or with running Java applications. This allows programmers to experiment and debug any Java system using Jython.

Is Jython a framework?

Jython is an open source implementation of the Python programming language, integrated with the Java platform. A programmer can compile Python source code to Java bytecode , and run the code on any Java virtual machine . The integration of Python and Java gives programmers access to all Java libraries.


1 Answers

Django is proven to work with Jython:

  • Special focus in Jython 2.5 was to make it compatible with modern web frameworks like Django
  • There is also a special project, django-jython, that focuses on making database backends and extensions available for Jython development.
  • There is explicit documentation on how to run Django on Jython

In theory, Jython is 100% compatible with CPython. In practice, some extensions or libraries may have badly written code that make them dependent on a specific Python implementation such as CPython. The django-jython project explicitly provides a tested solution to overcome this problem. Of course you can still run across some libraries that explicitly require CPython (hence mostly safe).

like image 184
jsalonen Avatar answered Sep 23 '22 00:09

jsalonen