On Thursday, December 1, 2011 7:48:29 PM UTC-5, rochacbruno wrote: > > I have an opinion about that. > > For me the /models folders should be renamed to /scripts since it has > scripts that are executed in every request.
I suppose you could be strict about it and only include model related code in model files, in which case calling them "models" is appropriate. I'm not sure "scripts" is a better name -- the word "script" doesn't imply "run on every request" any more than "model" does. Also, if you don't like having all models run on every request, another alternative is using conditional models (perhaps we could make that more flexible). I am now recommending to all of my students and clients to avoid the use of > models and go to class based system in modules Using classes and putting things in modules seem to be two separate issues. You could define classes in models or use a non-class based approach in modules. Also, isn't it sometimes useful to put code in a model file that you want to run on every (or nearly every) request without having to do an import? Anthony

