--
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()
tablel = SQLFORM.grid(db1.luStart1)
Execute the following:pace ..
as expectedstart ....--luStart1 works from appadmin
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", 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", 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'
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')
)
--
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.
and by replacing "poolsize" to "pool_size"?
hey. I have created a mysql database in my web2py app.