The answer:
~/myproject$ jython25 manage.py war \
--include-java-libs="/path/to/my/jdbc-driver.jar"
Providing that you have the latest svn revision on django-jython, and you have included 'doj' into your project INSTALLED_APPS, it will just work.
Then you drop the WAR file (generated in the parent directory of your project) into your application server, and that's all. No need to install Django or Jython in the target server. The WAR is completely self-contained.
If you are interested on Django/Jython, give this a try! And for more information, see the WarDeployment page on the django-jython wiki.


2 comments:
!! ... !!!!! ... !!!!!!111!!1!1
I *must* try this. It seriously can't be that easy. It just ... can't. You're a god among men, Leo. (and Jim. I smell Jim behind this as well.)
If it can be easy, it should be easy! And sure, Jim has a lot of credit. I'm sorry I wasn't able to implement all of his ideas and suggestions. But given enough time, other cool things should come.
BTW, this is all about "making easy things easy and hard things possible". We now have to work on a slightly more complicated things, such as mixing Django and Java Servlets on the same servlet context. It is not in any way impossible now (just take the generated WAR, unzip it and edit it as you want), but we should add more support for the typical usages...as soon as we figure out them.
But anyway, I really like simplicity. And I think that this little utility will make deploying Django/Jython projects a breeze.
Post a Comment