aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/sql/base.py
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2012-01-22 20:17:43 +0100
committerElrond <elrond+mediagoblin.org@samba-tng.org>2012-01-26 23:07:39 +0100
commit3c43cfc9f91b487d52ff7868f821fe920f676d90 (patch)
treef879c5afda5b78c504abc0576ee021b94d7171eb /mediagoblin/db/sql/base.py
parent997b419fe304427d587fceaae28f9a4652fb5f1a (diff)
downloadmediagoblin-3c43cfc9f91b487d52ff7868f821fe920f676d90.tar.lz
mediagoblin-3c43cfc9f91b487d52ff7868f821fe920f676d90.tar.xz
mediagoblin-3c43cfc9f91b487d52ff7868f821fe920f676d90.zip
Move declarative_base Base into base.py
The base class of all models "Base" should be in base.py.
Diffstat (limited to 'mediagoblin/db/sql/base.py')
-rw-r--r--mediagoblin/db/sql/base.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mediagoblin/db/sql/base.py b/mediagoblin/db/sql/base.py
index 6f45b21b..1db53c56 100644
--- a/mediagoblin/db/sql/base.py
+++ b/mediagoblin/db/sql/base.py
@@ -15,6 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker, object_session
from sqlalchemy.orm.query import Query
from sqlalchemy.sql.expression import desc
@@ -73,3 +74,6 @@ class GMGTableBase(object):
sess = Session()
sess.add(self)
sess.commit()
+
+
+Base = declarative_base(cls=GMGTableBase)