On Jun 11, 4:42 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > there is one convention in web2py that I am not happy with. The fact > that models are executed alphabetically. Originally I thought each > model would correspond to one database connection and so they would > independent and thus the order of execution would not matter.
model per db connection would work mapping file? but how to enforce it? Currently model name is not related to anything. Does this call for a DBs list or dictionary? This reminds me of: [d for d in globals().values() if isinstance(d,SQLDB)] > I was > wrong, most people write dependent model files. Thus the order of > execution is important and it is good that we have one. Nevertheless > alphabetical execution is probably not the best choice. Didn't you encourage this by using 0.py models? :D > I have been thinking about creating a mapping file to determine the > order of execution but it would increase too much the complexity of > web2py KIS, no more complexity. > Each model could declare its own dependencies and a mapping file could > be generated automatically and hidden under the hood. > > conditional execution fits in this discussion. Perhaps model files > could have names like if_controller_db.py so that it would be executed > only if the it_[controller] matches the current controller. > > ideas? comments? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---