[SQLObject] SQLObject and Webware newbie
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Vidar B. <vid...@ve...> - 2003-10-01 02:03:08
|
Dear good people, Im trying to learn Python have decided to try out webware (webkit) and SQLObjet. When I execute the following code in from the command line, every thing works fine. ----- from SQLObject import * class ListMember(SQLObject): conn = MySQLConnection(user='user', db='club') m = Member.select(Member.q.firstName=="Peter") print tuple(m) ----- but when I try to execute this code within webkit (below), I get an error saying "NameError: name 'Member' is not defined" ----- from WebKit.Page import Page from SQLObject import * class ListMember(SQLObject): def writeContent(self): conn = MySQLConnection(user='user', db='club') m = Member.select(Member.q.firstName=="Peter") print tuple(m) ----- Can anyone tell me what I need to do to get SQLObject working within webkit? thanks, - vidar, New York |