from sqlalchemy.util import memoized_property
from mediagoblin.db.extratypes import PathTupleWithSlashes, JSONEncoded
-from mediagoblin.db.sql.base import Base, DictReadAttrProxy
+from mediagoblin.db.base import Base, DictReadAttrProxy, Session
from mediagoblin.db.mixin import UserMixin, MediaEntryMixin, MediaCommentMixin, CollectionMixin, CollectionItemMixin
-from mediagoblin.db.sql.base import Session
# It's actually kind of annoying how sqlalchemy-migrate does this, if
# I understand it right, but whatever. Anyway, don't remove this :P
from sqlalchemy.util import memoized_property
from mediagoblin.db.extratypes import PathTupleWithSlashes, JSONEncoded
-from mediagoblin.db.sql.base import GMGTableBase
-from mediagoblin.db.sql.base import Session
+from mediagoblin.db.base import GMGTableBase, Session
Base_v0 = declarative_base(cls=GMGTableBase)
from sqlalchemy import create_engine
import logging
-from mediagoblin.db.sql.base import Base, Session
+from mediagoblin.db.base import Base, Session
from mediagoblin import mg_globals
_log = logging.getLogger(__name__)
+++ /dev/null
-# GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
-from mediagoblin.db.sql.base import Session
+from mediagoblin.db.base import Session
from mediagoblin.db.models import MediaEntry, Tag, MediaTag, Collection
from mediagoblin.tools.common import simple_printer
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from mediagoblin.db.sql.base import Base
+from mediagoblin.db.base import Base
from sqlalchemy import (
Column, Integer, ForeignKey)
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from mediagoblin.db.sql.base import Base
+from mediagoblin.db.base import Base
from sqlalchemy import (
Column, Integer, ForeignKey)
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from mediagoblin.db.sql.base import Base
+from mediagoblin.db.base import Base
from sqlalchemy import (
Column, Integer, Float, ForeignKey)
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from mediagoblin.db.sql.base import Base
+from mediagoblin.db.base import Base
from sqlalchemy import (
Column, Integer, SmallInteger, ForeignKey)
from datetime import datetime, timedelta
-from mediagoblin.db.sql.base import Base
+from mediagoblin.db.base import Base
from mediagoblin.db.models import User
from sqlalchemy import (
from sqlalchemy.sql import select, insert
from migrate import changeset
-from mediagoblin.db.sql.base import GMGTableBase
+from mediagoblin.db.base import GMGTableBase
from mediagoblin.db.util import MigrationManager, RegisterMigration
from mediagoblin.tools.common import CollectingPrinter
from mediagoblin.tools import testing
from mediagoblin.init.config import read_mediagoblin_config
from mediagoblin.db.open import setup_connection_and_db_from_config
-from mediagoblin.db.sql.base import Session
+from mediagoblin.db.base import Session
from mediagoblin.meddleware import BaseMeddleware
from mediagoblin.auth.lib import bcrypt_gen_password_hash
from mediagoblin.gmg_commands.dbupdate import run_dbupdate
test_user = mg_globals.database.User.find_one({'username': username})
# ... and detach from session:
- from mediagoblin.db.sql.base import Session
Session.expunge(test_user)
return test_user