Yes, I am correct. That's a bit subtle. By making a model folder ZZZ and putting a copy of the requested model in there, it works. Not ideal. Possibly could be a bug, maybe. Or perhaps needs to be better documented.
On Fri, Oct 4, 2013 at 1:37 PM, Tim Richardson <[email protected]>wrote: > I have response.models_to_run = ['.*'] > at the top of the C1/C1_db model. > When I put a breakpoint, it completes the rest of the C1_db model, and > arrives at compileapp.py at a loop > for model in models: > > this is the loop where the regex is evaluated. > But it doesn't enter the loop. > I'm guessing that perhaps I have reentered that loop on the last iteration > of models. > > Anyway, it never evaluates my new regex. > > I have been misleading with my example names: I say C1 but alphabetically > the model with my response.models_to_run is actually later in the > alphabet.It is the final model. The model I want to execute has alphabetic > precedence. > Perhaps this is the problem: the use of response.models_to_run does not > regenerate the list of models, it just changes the test to execute a model > from a candidate list, but if a candidate has already been evaluated it > doesn't get looked at again. > > > > On Fri, Oct 4, 2013 at 1:09 PM, Anthony <[email protected]> wrote: > >> An alternative would be something like this: >> >> what_models_to_be_executed = {"C1": ["tab1.py", "tab2.py", "tab3.py"], >>> "C2": "tab2.py"} >>> response.models_to_run = what_models_to_be_executed[**request.controller] >>> >>> >> >> Note, it must be a list (above, in the case of C2, it would just be a >> string). >> >> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "web2py-users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/web2py/OiZ6vwaNuEU/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Tim Richardson > -- Tim Richardson -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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.

