There is an old proposal from Mariano to address that we should revisit 
that. Yet I find that if a model is needed by multiple controllers, it can 
be defined at top-level. It is in general a good design to group actions in 
controllers depending on which models they need.


On Tuesday, 17 July 2012 12:51:36 UTC-5, rochacbruno wrote:
>
> The conditional models are good, but the problem is the fact that they are 
> not reusable, when you need the same table on multiple controllers, or you 
> have to define it globally, or you have to repeat the definition on every 
> sub model.
>
> I think having a module with functions or classes to define the tables are 
> better, and qhen you have this, you dont need to use submodels, because you 
> can run each desired function/class direclty on the controller.
>
> On Tue, Jul 17, 2012 at 2:46 PM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> I remind the readers we have conditional models:
>>
>> models/db.py (runs for every action)
>> models/default/db.py runs (runs only for actions in 
>> controllers/default.py)
>> models/default/index/db.py runs (runs only for action index() in 
>> controllers/default.py)
>>
>> This speeds things a lot.
>>
>
>

-- 



Reply via email to