[web2py] Re: multiple models in a plugin component

2014-06-13 Thread Anthony
Yes, by default, response.models_to_run is set so web2py runs all models in the top level /models folder, and then any models in subfolders whose names match the request controller and function (so model files in a folder named after the plugin would only be run if the plugin controller is calle

[web2py] Re: multiple models in a plugin component

2014-06-13 Thread Louis Amon
Ok here's my best solution so far: I keep the whole plugin contained according to the rules defined in the documentation and, in order to have my my models visible to the global namespace, I expose the plugin's model folder using this little line : response.models_to_run.append('plugin_name')

[web2py] Re: multiple models in a plugin component

2014-06-11 Thread Louis Amon
I found an answer to my own question : I split my model (plugin_name.py) into multiple files (0_settings.py, 1_user.py, etc.) and put them all in a folder ./models/plugin_name/ Web2py does detect that all my model files belong to the same plugin and packs them together. *Another problem happen