hi anthony,
*/modules/mymodule.py:*
from gluon import Field
def mymodels(db):
db.define_table('table1', Field('field1'), Field('field2'))
db.define_table('table2', Field('field1'), Field('field2'))
*/models/db.py or /controllers/some_controller.py:*
from mymodule import mymodels
mymodels(db)
in your example above, it said that the import can be on models and
controllers, i've test both (put in models and in controllers), if i just
put in controllers, the database administration (appadmin) for table1 and
table2 is not shown, the database administration (appadmin) for table1 and
table2 will shown if i import mymodels(db) in models.
my question, is it possible to import mymodels in controllers yet still got
access for database adminsitration (appadmin) for table1 and table2 without
import it in models?
ref:
https://groups.google.com/forum/#!topic/web2py/b65mya4wamg
thanks and best regards,
stifan
--
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.