[web2py] Re: 2 models / How can you call a model from different application?

2012-03-21 Thread Cliff
I have done what you want to do, but I won't do it again. Too complicated keeping the different versions of the model in synch. Also there are migration issues-- Consider putting everything into a single application. Check out this link: http://web2py.com/book/default/chapter/04#Cooperation Br

[web2py] Re: 2 models / How can you call a model from different application?

2012-03-21 Thread n1ck
Hm I see, so if you are building a system you just create single application, right? On Mar 21, 10:16 pm, Cliff wrote: > I have done what you want to do, but I won't do it again.  Too > complicated keeping the different versions of the model in synch. > > Also there are migration issues--

[web2py] Re: 2 models / How can you call a model from different application?

2012-03-21 Thread Cliff
The models-in-modules method certainly works. It is best suited for large applications, though. On Mar 21, 10:46 am, Bruce Wade wrote: > I have multiple applications. I have been moving more of my code into > modules which defines tables that both applications may use. You can import > a module

[web2py] Re: 2 models / How can you call a model from different application?

2012-03-21 Thread n1ck
Thank You Guys for all the help... :D

Re: [web2py] Re: 2 models / How can you call a model from different application?

2012-03-21 Thread Bruce Wade
I have multiple applications. I have been moving more of my code into modules which defines tables that both applications may use. You can import a module in one application from a different application. There have been quite a few examples of this now. My system currently has 4 applications and 3

Re: [web2py] Re: 2 models / How can you call a model from different application?

2012-03-21 Thread Anthony
You can also now do: db = DAL(..., folder='path/to/app/databases/folder', auto_import=True) That will automatically define the database models of the external app based on the metadata stored in the .table files in the app's /databases folder. Note, that will only get you the field names and ty