i am running web2py 2.4.6 on apache with mod_wsgi, track_changes seems to always work for the first modify after i restart apache. 2nd changes and so on to the module will not always trigger module reload.
On Monday, December 10, 2012 6:55:06 AM UTC+8, Massimo Di Pierro wrote: > > This has come up before. > > from gluon.custom_import import track_changes; track_changes() > > must be a model file, before the modules are imported, not in the modules > themselves which are otherwise cached and therefore the line may or may not > be executed. > > Massimo > > On Sunday, 9 December 2012 15:34:09 UTC-6, Chr_M wrote: >> >> Sometimes the changes in the code of a module (in the modules directory) >> are not working when requesting the url that uses these modules. in the >> modules directory I have a subdirectory with python files that form a >> package (__init__.py file in this subdirectory). I have added >> >> from gluon.custom_import import track_changes >> track_changes() >> >> in the first model that gets called, but still sometimes code changes are >> not working. I noticed that the py-files in the modules dir get compiled to >> pyc-files. But at one point (it looks to be randomly) these are not >> compiled anymore when I change code in the py-files. But even when I remove >> these pyc-files, the code changes are still not working when requesting the >> url. >> >> Am I missing something? Is there a cache I can clear or something? I now >> have to restart web2py to make the code changes work... >> >> Thanks. >> >> Regards, Chris >> >> -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

