« Return to Thread: Reloading of django views.py in modjy

Re: Reloading of django views.py in modjy

by Alan Kennedy-2 :: Rate this Message:

Reply to Author | View in Thread

[Leo]
> But my take on the issue is that modjy's reloading strategy is falling
> short on your use case and should be improved. If you fill an issue on
> <http://bugs.jython.org> (so this doesn't get forgotten) you will
> probably be helping to make Jython better!

Modjy permits two ways to specify an application.

1. By directory/filename/callable_name triple.

http://opensource.xhaus.com/projects/modjy/wiki/ModjyAppExecFile

The contents of the file specified by directory/filename are
execfile()d, and the callable name extracted from the resulting
namespace.

If the "reload_on_mod" flag is true, then the file containing the
application code is checked for modification, and re-execfile()ed if
the file has been modified.

If there are dependent modules that are imported as a result of the
execfile, then those dependent modules should also be re-compiled and
imported.

2. By specifying an importable name.

http://opensource.xhaus.com/projects/modjy/wiki/ModjyAppImportable

When an applicaiton is specified this way, e.g.
"some_framework.web.handlers.WSGIHandlerClass()", the name is
imported, and perhaps instantiated, using the standard jython import
machinery.

As stated on the above page, source reloading *is not supported* when
using the importable name mechanism.

In this scenario, the only way to get an application reload is to
restart the entire web application, AFAIK.

So, some questions to the OP

1. What application mechanism are you using?
2. Are you using the "reload_on_mod" flag?

Probably best if you could tell us the values of all of the modjy
configuration variables you are using.

Alan.

------------------------------------------------------------------------------
_______________________________________________
Jython-users mailing list
Jython-users@...
https://lists.sourceforge.net/lists/listinfo/jython-users

 « Return to Thread: Reloading of django views.py in modjy