It's easy to share a db -- just use the same connection string. However, it is more difficult to share models (either put them in modules, where they can be imported, or use auto_import<http://web2py.com/books/default/chapter/29/06#Using-DAL-without-define-tables>). You should be able to load the "plugin" app as a component in another app -- just specify its URL via the "url" argument to LOAD(). See http://web2py.com/books/default/chapter/29/04#Cooperation.
Anthony On Thursday, May 2, 2013 3:10:44 PM UTC-4, b00m_chef wrote: > > Essentially it is another app. However, it still needs to talk to the > other apps' DBs, and one must still be able to LOAD the app's views in > other apps. > > Is this possible? Is there some documentation on inter-app coding > somewhere? I need to CRUD and LOAD. > > Thanks, > > > > On Thursday, May 2, 2013 11:24:51 AM UTC-7, Anthony wrote: >> >> If it's self-contained, you might consider putting it in another app. >> >> Anthony >> >> On Thursday, May 2, 2013 11:44:58 AM UTC-4, b00m_chef wrote: >>> >>> Correct. That way, if you have your webapp built from components, your >>> main controller/model/view folders will not look like a complete mess of >>> hundreds of files. >>> >>> At the moment, the current component & plugin structure only works for >>> web apps containing less than 20 components / plugins. As soon as you have >>> more of them, it becomes painful to manage. >>> >>> Just a thought. >>> >>> Thanks, >>> >>> >>> >>> On Wednesday, May 1, 2013 12:11:18 PM UTC-7, Niphlod wrote: >>>> >>>> I'm not sure I follow .... >>>> let's take an hypothetical "do_this" component >>>> you can have >>>> controllers/do_this.py >>>> models/do_this.py or models/do_this/whatever.py >>>> views/do_this/index.html ....views/do_this/anotherindex.html (or .load, >>>> or .json, or .whatisneeded) >>>> >>>> and in your view simply calling LOAD('do_this', 'index') >>>> >>>> and all works. The only thing that is not "contained" in a folder is >>>> the controller file, and that's more or less the recommended structure for >>>> web2py plugins. If you take "the structure" a little bit further (like the >>>> one explained in the book at >>>> http://web2py.com/books/default/chapter/29/12#Plugins) you'd have also >>>> the admin app grouping them all in a single "manage this plugin" page. >>>> >>>> What do you need ? all those files in a single folder ? >>>> >>>> -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.