[SQL-CVS] r457 - trunk/SQLObject/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2004-12-07 16:30:09
|
Author: ianb Date: 2004-12-07 16:30:00 +0000 (Tue, 07 Dec 2004) New Revision: 457 Added: trunk/SQLObject/sqlobject/util/ Modified: trunk/SQLObject/sqlobject/__init__.py trunk/SQLObject/sqlobject/styles.py Log: R Modified: trunk/SQLObject/sqlobject/__init__.py =================================================================== --- trunk/SQLObject/sqlobject/__init__.py 2004-12-07 16:29:14 UTC (rev 456) +++ trunk/SQLObject/sqlobject/__init__.py 2004-12-07 16:30:00 UTC (rev 457) @@ -34,11 +34,6 @@ _warn('SQLiteConnection is deprecated; use connectionForURI("sqlite://...") or "from sqlobject.sqlite import builder; SQLiteConnection = builder()"') return _sqlite.builder()(*args, **kw) -import dbm as _dbm -def DBMConnection(*args, **kw): - _warn('DBMConnection is deprecated; use connectionForURI("dbm://...") or "from sqlobject.dbm import builder; DBMConnection = builder()"') - return _dbm.builder()(*args, **kw) - import sybase as _sybase def SybaseConnection(*args, **kw): _warn('SybaseConnection is deprecated; use connectionForURI("sybase://...") or "from sqlobject.sybase import builder; SybaseConnection = builder()"') Modified: trunk/SQLObject/sqlobject/styles.py =================================================================== --- trunk/SQLObject/sqlobject/styles.py 2004-12-07 16:29:14 UTC (rev 456) +++ trunk/SQLObject/sqlobject/styles.py 2004-12-07 16:30:00 UTC (rev 457) @@ -87,6 +87,10 @@ DefaultStyle = MixedCaseUnderscoreStyle +class UnderscoreStyle(MixedCaseUnderscoreStyle): + def instanceAttrToIDAttr(self, attr): + return attr + '_id' + class MixedCaseStyle(Style): """ |