# HG changeset patch # User Marcin Kuzminski # Date 2011-11-11 17:42:10 # Node ID f522f4d3bf93be2f2e47c3759d9dd1b962bcf9e2 # Parent f1c87ffcfb95a0792bf8900d44dcbec70b974804 moved caching query to libs diff --git a/rhodecode/model/caching_query.py b/rhodecode/lib/caching_query.py rename from rhodecode/model/caching_query.py rename to rhodecode/lib/caching_query.py diff --git a/rhodecode/lib/dbmigrate/schema/db_1_2_0.py b/rhodecode/lib/dbmigrate/schema/db_1_2_0.py --- a/rhodecode/lib/dbmigrate/schema/db_1_2_0.py +++ b/rhodecode/lib/dbmigrate/schema/db_1_2_0.py @@ -45,7 +45,7 @@ from rhodecode.lib.exceptions import Use from rhodecode.lib.compat import json from rhodecode.model.meta import Base, Session -from rhodecode.model.caching_query import FromCache +from rhodecode.lib.caching_query import FromCache log = logging.getLogger(__name__) diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py --- a/rhodecode/lib/utils.py +++ b/rhodecode/lib/utils.py @@ -43,8 +43,9 @@ from vcs.utils.lazy import LazyProperty from vcs.utils.helpers import get_scm from vcs.exceptions import VCSError +from rhodecode.lib.caching_query import FromCache + from rhodecode.model import meta -from rhodecode.model.caching_query import FromCache from rhodecode.model.db import Repository, User, RhodeCodeUi, UserLog, RepoGroup, \ RhodeCodeSetting diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -44,9 +44,10 @@ from rhodecode.lib import str2bool, safe generate_api_key, safe_unicode from rhodecode.lib.exceptions import UsersGroupsAssignedException from rhodecode.lib.compat import json +from rhodecode.lib.caching_query import FromCache from rhodecode.model.meta import Base, Session -from rhodecode.model.caching_query import FromCache + log = logging.getLogger(__name__) diff --git a/rhodecode/model/meta.py b/rhodecode/model/meta.py --- a/rhodecode/model/meta.py +++ b/rhodecode/model/meta.py @@ -3,7 +3,7 @@ from sqlalchemy.ext.declarative import d from sqlalchemy.orm import scoped_session, sessionmaker from beaker import cache -from rhodecode.model import caching_query +from rhodecode.lib import caching_query # Beaker CacheManager. A home base for cache configurations. diff --git a/rhodecode/model/permission.py b/rhodecode/model/permission.py --- a/rhodecode/model/permission.py +++ b/rhodecode/model/permission.py @@ -28,9 +28,11 @@ import traceback from sqlalchemy.exc import DatabaseError +from rhodecode.lib.caching_query import FromCache + from rhodecode.model import BaseModel from rhodecode.model.db import User, Permission, UserToPerm, UserRepoToPerm -from rhodecode.model.caching_query import FromCache + log = logging.getLogger(__name__) diff --git a/rhodecode/model/repo.py b/rhodecode/model/repo.py --- a/rhodecode/model/repo.py +++ b/rhodecode/model/repo.py @@ -34,9 +34,9 @@ from vcs.utils.lazy import LazyProperty from vcs.backends import get_backend from rhodecode.lib import safe_str +from rhodecode.lib.caching_query import FromCache from rhodecode.model import BaseModel -from rhodecode.model.caching_query import FromCache from rhodecode.model.db import Repository, UserRepoToPerm, User, Permission, \ Statistics, UsersGroup, UsersGroupRepoToPerm, RhodeCodeUi, RepoGroup from rhodecode.model.user import UserModel diff --git a/rhodecode/model/user.py b/rhodecode/model/user.py --- a/rhodecode/model/user.py +++ b/rhodecode/model/user.py @@ -29,8 +29,9 @@ import traceback from pylons.i18n.translation import _ from rhodecode.lib import safe_unicode +from rhodecode.lib.caching_query import FromCache + from rhodecode.model import BaseModel -from rhodecode.model.caching_query import FromCache from rhodecode.model.db import User, UserRepoToPerm, Repository, Permission, \ UserToPerm, UsersGroupRepoToPerm, UsersGroupToPerm, UsersGroupMember from rhodecode.lib.exceptions import DefaultUserException, \ diff --git a/rhodecode/model/users_group.py b/rhodecode/model/users_group.py --- a/rhodecode/model/users_group.py +++ b/rhodecode/model/users_group.py @@ -26,8 +26,9 @@ import logging import traceback -from rhodecode.model import BaseModel -from rhodecode.model.caching_query import FromCache +from rhodecode.lib.caching_query import FromCache + +from rhodecode.model import BaseMode from rhodecode.model.db import UsersGroupMember, UsersGroup log = logging.getLogger(__name__)