I've tried to use classes in model file in 0.3 but getting errors.
webpy seems to want to pass an additional parameter
model.py
db = web.database(dbn='sqlite3', db='myfile')
Class Widget:
def get_widgets():
widgets = list(db.select('widgets'))
return widgets
code.py
from model import Widget
class index:
def Get(self):
widgets = Widget.get_widgets()
>>> error - no parameters requested, 1 supplied
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---