hello , i have this action in defaul.py
"""
@auth.requires_login()
def lista_fornitori():
fornitori = legacy_db().select(legacy_db.fornitori.ALL,orderby=legacy_db.fornitori.BrandName.upper())
return dict(fornitori = fornitori)
""
and this work perfectly giving me the list of records in table 'fornitori'
Now in another action i need to retrieve the same list for creating a select,
but this time the same code
fornitori = legacy_db().select(legacy_db.fornitori.ALL)
fails with error
AttributeError: 'DAL' object has no attribute 'fornitori'
why in this action DAL does not find the table fornitori? What could be the problem.
The 2 actions are both in default.py
The beginning of thje second actions:
def sel_fornitore():
fornitori = legacy_db(legacy_db.fornitori.ALL).select()
i also tried from shell with the same error.
What i am missing?