scheme://[user[:password]@]host[:port]/database[?parameters]
For instance:
postgres://user:pwd@localhost:5432/db
SQLObject provides a debug mechanism, which can be turned on easily by appending ?debug=True to the end of your database URI in the dev.cfg file.
postgres://user:pwd@localhost:5432/db?debug=True
This would publish the query generated onto the console.
..........
Define the existing table Bookmark as a class in model.py:-
class Bookmark(SQLObject):
_fromDatabase = True # the table schema be loaded from the database
BookmarkName = StringCol (dbName="bookmark_name")
ProjectId = IntCol(dbName="project_id")
# dbName is the name of the column in the database, BookmarkName is the name reference in code.
..........
Using the following code in controller.py you should be able to retrieve the second record from the Bookmark table
b=Bookmark.select()
print ": %s " % b[2].BookmarkName