I did notice, if I pull the DB generation from a .py file in modules and move it into the the db.py file, I see it inside the web management gui.
On Sun, Mar 13, 2016 at 9:33 AM, Shane Raney <sra...@gortfm.com> wrote: > Opps, that was a typo on my behalf while reproducing the code on my iPad. > Good catch though. > > > On Sun, Mar 13, 2016 at 9:31 AM, Paolo Caruccio < > paolo.carucci...@gmail.com> wrote: > >> and by replacing "poolsize" to "pool_size"? >> >> >> http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#DAL-signature >> >> >> Il giorno domenica 13 marzo 2016 17:12:17 UTC+1, Shayn Raney ha scritto: >>> >>> Even If I rename the db's to just 'Cats' I see the same issue. >>> >>> >>> On Mar 13, 2016, at 4:08 AM, Paolo Caruccio <paolo.ca...@gmail.com> >>> wrote: >>> >>> Try to replace dash ("-") with uderscore ("_") in the variable names >>> i.e. db_cats >>> >>> >>> Il giorno sabato 12 marzo 2016 15:10:33 UTC+1, Shayn Raney ha scritto: >>>> >>>> I would like to implement something like this to use two sqlite3 >>>> databases. I've tried to create the following within a new model via the >>>> web admin gui and did not see the new tables under the 'Available Databases >>>> and Tables' appadmin page. Does the 'Available Databases and Tables' page >>>> only show the items within the 'storage.sqlite' file? >>>> >>>> db-cats = DAL('sqlite://cats.sqlite', poolsize = 1) >>>> >>>> db-cats.define_table('names', >>>> Field('name', 'string'), >>>> Field('age', 'integer'), >>>> Field('account', 'integer') >>>> ) >>>> >>>> db-cats.define_table('owner', >>>> Field('fname', 'string'), >>>> Field('lname', 'string'), >>>> Field('phone', 'string') >>>> ) >>>> >>>> >>>> >>>> >>>> On Wednesday, January 2, 2013 at 9:05:27 AM UTC-8, Alec Taylor wrote: >>>>> >>>>> >>>>> >>>>> On Wed, Jan 2, 2013 at 10:53 PM, Simon Ashley <greg...@gmail.com> >>>>> wrote: >>>>> >>>>>> Ok then, should this work? >>>>>> (Version 2.3.2 (2012-12-17 15:03:30) stable, source, nightly build, >>>>>> from 12/31) >>>>>> >>>>>> *Connection* >>>>>> db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all' >>>>>> ]) >>>>>> db1 = DAL('mysql://root:www@localhost:3306/xxx', migrate=True, >>>>>> fake_migrate=False, check_reserved=['common','mysql']) #www and >>>>>> xxx's have been blanked (place markers) >>>>>> >>>>>> *Model* >>>>>> db.define_table('luPace', >>>>>> Field('Description','string', label='Pace'), >>>>>> Field('icon','string', length=100), >>>>>> Field('bgcolor','string'), >>>>>> Field('fgcolor','string')) >>>>>> >>>>>> db1.define_table('luStart1', >>>>>> Field('Description','string', label='Start'), >>>>>> Field('icon','string'), >>>>>> Field('bgcolor','string'), >>>>>> Field('fgcolor','string')) >>>>>> >>>>>> *Controller* >>>>>> def pace(): >>>>>> tablel = SQLFORM.grid(db.luPace) >>>>>> return locals() >>>>>> >>>>>> def start(): >>>>>> tablel = SQLFORM.grid(db.luStart1) >>>>>> return locals() >>>>>> >>>>> >>>>> You'll want to change the first line of that second function: >>>>> >>>>> tablel = SQLFORM.grid(db1.luStart1) >>>>> >>>>> >>>>> >>>>>> Execute the following: >>>>>> >>>>>> *pace ..* >>>>>> >>>>>> as expected >>>>>> >>>>>> >>>>>> *start ....* >>>>>> >>>>>> Traceback (most recent call last): >>>>>> >>>>>> File "C:\web2py15\gluon\restricted.py", line 212, in restricted >>>>>> >>>>>> exec ccode in environment >>>>>> File "C:/web2py15/applications/test1/controllers/test.py" >>>>>> <http://127.0.0.1:8000/admin/default/edit/test1/controllers/test.py>, >>>>>> line 13, in <module> >>>>>> >>>>>> File "C:\web2py15\gluon\globals.py", line 193, in <lambda> >>>>>> >>>>>> self._caller = lambda f: f() >>>>>> >>>>>> File "C:/web2py15/applications/test1/controllers/test.py" >>>>>> <http://127.0.0.1:8000/admin/default/edit/test1/controllers/test.py>, >>>>>> line 9, in start >>>>>> >>>>>> tablel = SQLFORM.grid(db.luStart1) >>>>>> >>>>>> File "C:\web2py15\gluon\dal.py", line 7255, in __getattr__ >>>>>> >>>>>> return ogetattr(self, key) >>>>>> AttributeError: 'DAL' object has no attribute 'luStart1' >>>>>> >>>>>> *luStart1* works from appadmin >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>>> -- >>> Resources: >>> - http://web2py.com >>> - http://web2py.com/book (Documentation) >>> - http://github.com/web2py/web2py (Source code) >>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>> --- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "web2py-users" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/web2py/IbBzVyeCSFg/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> web2py+un...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >>> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "web2py-users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/web2py/IbBzVyeCSFg/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> web2py+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > --------------------------------------- > 1. break nothing but silence > 2. take nothing but pictures > 3. leave nothing but footprints > ---------------------------------------- > -- --------------------------------------- 1. break nothing but silence 2. take nothing but pictures 3. leave nothing but footprints ---------------------------------------- -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.