Let me know where the repository is for working on this modeless approach. I am interested, as I my current projects are very large. Over 200 tables (multiple databases)
On Mon, Mar 12, 2012 at 5:00 PM, Bruno Rocha <rochacbr...@gmail.com> wrote: > > > On Mon, Mar 12, 2012 at 8:46 PM, pbreit <pbreitenb...@gmail.com> wrote: > >> from models import auth_user, product > > > in my code the same is doing with. > > from mymodule import DataBase, User # db and auth > from datamodels.product import Product # the definition of product class > > def function(): > db = DataBase([User, Product]) > products = db(db.Product.id>0).select() > users = db(db.User.id>0).select() # also possible to refer as > db.auth_user.id>0 > return dict(products=products, users=users) > > But I am sure there is a better approach, we just need to find and > document it. > > > > > > -- > > Bruno Rocha > [http://rochacbruno.com.br] > > -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.warplydesigned.com http://www.fitnessfriendsfinder.com