Re: [SQLObject] my updateSchema small routine
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Oleg B. <ph...@ph...> - 2006-09-24 06:48:10
|
On Sun, Sep 24, 2006 at 12:03:04AM +0200, sophana wrote: > Here is my (very small) contribution to sqlobject, that I find very cool > to program with. Thank you! > When I have some time (not now), I will try to make a clean patch+tests. > (SQLObject 0.7.1dev) At that time SQLObject 0.7.1 final will be released, so your patch will go to the trunk, and thus should be created and tested against the trunk. > class MySqlObject(SQLObject): Oops, at the first glance I thought (guessing from the name) it is MySQL-only! ;) PikleableSQLObject? > def __setstate__(self,id): > def getNone(cls,id): Preferred style is: def __setstate__(self, id): def getNone(cls, id): (spaces) and 4 spaces for an indent: try: return cls.get(id) except SQLObjectNotFound: return None except: raise With all those print's this > def updateSchema(self, doIt=False, connection=None): looks like a debugging procedure... Oleg. -- Oleg Broytmann http://phd.pp.ru/ ph...@ph... Programmers don't die, they just GOSUB without RETURN. |