From: David J. <dav...@gm...> - 2009-06-16 16:23:21
|
Hi all, I'm new here so if this is the wrong place for this question don't hesitate to yell at me :-) I'm trying to run django inside a WAR file with modjy on a JBoss 4.2.2 Application server. (Next step is to integrate it into a jboss seam project) The deployment time isn't great so I'm trying to get jython/modjy to reload my django application on change of a source file, as in the development server of django. I tried a lot of things. modjy will reload application.py on modification, so I tried to manually reload my views.py. Something like: def handler(environ, start_response): os.putenv("DJANGO_SETTINGS_MODULE", "clean.settings") h = wsgi.WSGIHandler() import hello.views reload(hello.views) return h(environ, start_response) Didn't work. So I tried further to remove the views$py.class file, and indeed it get's compiled if I remove it manually and touch application.py causing modjy to reload it and in turn triggers my import. An judging by changing filesize of views$py.class it would seem it's the updated views.py it compiles, but it still runs the old code! If I remove both views.py and it's class, then touch application.py i get a "No module named views" error... So basically: 1) Has anyone done anything like this? 2) Why does it not execute the compile code? (is it a java thing?) 3) Am I barking up the wrong tree? If anyone has any clue what I could try next It would be greatly appriated! Thanks! /davidj |