rows = db(db.definitions.definitions).select()
File "/usr/local/lib/python2.7/dist-packages/pydal/base.py", line 669, in __getattr__
return BasicStorage.__getattribute__(self, key)
AttributeError: 'DAL' object has no attribute 'definitions'
I am getting the above error with my code.
I am using a function in the models that imports several functions like this below:
def definitions(): db = current.db rows = db(db.definitions.definitions).select() for row in rows: return row.definitions
The model code is this:
db = DAL('sqlite://storage.sqlite', pool_size=1000000, folder=None, db_codec='UTF-8', check_reserved=None, migrate=False, fake_migrate=False,))
db.define_table('definitions', Field('definitions', 'text', length= 1000000, default="", notnull=True))
What could be wrong with my code? and how do I correct it.
Regards