I am using /models just to define small global functions and to set some
response and request keys.

All my code including datamodels I  am putting into /modules

In my mind I changed the /models to /scripts or /batches so it is more easy
to understand why avoiding it.

my current structure is:

/modules/datamodels/someentity.py - Database definitions

/modules/handlers/someentity.py - my code logic and template rendering

/modules/helpers/* - miscelanious

/modules/myappname.py - My.custom Auth, db, Mail, Service etc..

/controllers/someentytity.py - it will just be a point of entry, here I do
selective imports, intantiate the entities and call the template rendering.

views files can be stored anywhere filesystem or database.

http://zerp.ly/rochacbruno
Em 27/01/2012 17:48, "Magnitus" <eric_vallee2...@yahoo.ca> escreveu:

> >This is very good advice. I have moved many of my plugins and apps from
> using models to modules because of the performance gain. There is nothing
> wrong with the models implementation, but it's really meant to define
> tables and that's it. Functionality that doesn't belong in a controller
> should go to modules.<
>
> Interesting, so to clarify: are you minimizing the amount of code into the
> model (limiting it to table definitions) or you avoid using a model at all?
>

Reply via email to