Форум сайта python.su
class Person(SQLObject):
firstName = UnicodeCol(dbEncoding="cp1251")
middleInitial = UnicodeCol(default=None, dbEncoding="cp1251")
lastName = UnicodeCol(dbEncoding="cp1251")
C:\Documents and Settings\user\workspace\1\src\manytoone>tg-admin shell
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
(CustomShell)
>>> trans = Person._connection.transaction()
>>> trans.commit()
>>> p = Person(firstName="Vasya", lastName="Pupkin")
>>> trans.commit()
>>> exit();
Отредактировано (Сен. 9, 2008 13:32:16)
Офлайн
The last .commit() should be called as .commit(close=True) to release low-level connection back to the connection pool.
Офлайн