diff options
author | Marcin Kuzminski <marcin@python-works.com> | 2012-03-07 02:18:22 +0200 |
---|---|---|
committer | Marcin Kuzminski <marcin@python-works.com> | 2012-03-07 02:18:22 +0200 |
commit | 769ccd24d9c88f847a66ae0f7d66b332d5257348 (patch) | |
tree | fb942fc09df2815bbb0202e8626491263e91a3da /rhodecode/model | |
parent | 8f0a7827ff7fb54cc2d947c08be8443a46c23906 (diff) |
utils/conf
- created temporary utils2
- made config.conf for storing some configurations
- fixed some dependency import problems
- code cleanup
- rc-extensions now properly work for celery
--HG--
branch : beta
Diffstat (limited to 'rhodecode/model')
-rw-r--r-- | rhodecode/model/comment.py | 2 | ||||
-rwxr-xr-x | rhodecode/model/db.py | 3 | ||||
-rw-r--r-- | rhodecode/model/notification.py | 3 | ||||
-rw-r--r-- | rhodecode/model/repo.py | 3 | ||||
-rw-r--r-- | rhodecode/model/repos_group.py | 2 | ||||
-rw-r--r-- | rhodecode/model/scm.py | 2 | ||||
-rw-r--r-- | rhodecode/model/user.py | 4 |
7 files changed, 9 insertions, 10 deletions
diff --git a/rhodecode/model/comment.py b/rhodecode/model/comment.py index 3753198c..51d6bf1e 100644 --- a/rhodecode/model/comment.py +++ b/rhodecode/model/comment.py @@ -29,7 +29,7 @@ import traceback from pylons.i18n.translation import _ from sqlalchemy.util.compat import defaultdict -from rhodecode.lib import extract_mentioned_users +from rhodecode.lib.utils2 import extract_mentioned_users from rhodecode.lib import helpers as h from rhodecode.model import BaseModel from rhodecode.model.db import ChangesetComment, User, Repository, Notification diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py index 864c006b..1e3b8756 100755 --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -39,7 +39,8 @@ from rhodecode.lib.vcs.utils.helpers import get_scm from rhodecode.lib.vcs.exceptions import VCSError from rhodecode.lib.vcs.utils.lazy import LazyProperty -from rhodecode.lib import str2bool, safe_str, get_changeset_safe, safe_unicode +from rhodecode.lib.utils2 import str2bool, safe_str, get_changeset_safe, \ + safe_unicode from rhodecode.lib.compat import json from rhodecode.lib.caching_query import FromCache diff --git a/rhodecode/model/notification.py b/rhodecode/model/notification.py index c8ef0f80..d23805c4 100644 --- a/rhodecode/model/notification.py +++ b/rhodecode/model/notification.py @@ -32,6 +32,7 @@ import datetime from pylons.i18n.translation import _ import rhodecode +from rhodecode.config.conf import DATETIME_FORMAT from rhodecode.lib import helpers as h from rhodecode.model import BaseModel from rhodecode.model.db import Notification, User, UserNotification @@ -176,8 +177,6 @@ class NotificationModel(BaseModel): notification.TYPE_REGISTRATION: _('registered in RhodeCode') } - DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S" - tmpl = "%(user)s %(action)s %(when)s" if show_age: when = h.age(notification.created_on) diff --git a/rhodecode/model/repo.py b/rhodecode/model/repo.py index 90609bb5..700da381 100644 --- a/rhodecode/model/repo.py +++ b/rhodecode/model/repo.py @@ -30,8 +30,7 @@ from datetime import datetime from rhodecode.lib.vcs.backends import get_backend -from rhodecode.lib import LazyProperty -from rhodecode.lib import safe_str, safe_unicode +from rhodecode.lib.utils2 import LazyProperty, safe_str, safe_unicode from rhodecode.lib.caching_query import FromCache from rhodecode.lib.hooks import log_create_repository diff --git a/rhodecode/model/repos_group.py b/rhodecode/model/repos_group.py index 5bc435e7..8791b21b 100644 --- a/rhodecode/model/repos_group.py +++ b/rhodecode/model/repos_group.py @@ -28,7 +28,7 @@ import logging import traceback import shutil -from rhodecode.lib import LazyProperty +from rhodecode.lib.utils2 import LazyProperty from rhodecode.model import BaseModel from rhodecode.model.db import RepoGroup, RhodeCodeUi, UserRepoGroupToPerm, \ diff --git a/rhodecode/model/scm.py b/rhodecode/model/scm.py index cfeb1fe7..9d2aa466 100644 --- a/rhodecode/model/scm.py +++ b/rhodecode/model/scm.py @@ -35,7 +35,7 @@ from rhodecode.lib.vcs.nodes import FileNode from rhodecode import BACKENDS from rhodecode.lib import helpers as h -from rhodecode.lib import safe_str +from rhodecode.lib.utils2 import safe_str from rhodecode.lib.auth import HasRepoPermissionAny, HasReposGroupPermissionAny from rhodecode.lib.utils import get_repos as get_filesystem_repos, make_ui, \ action_logger, EmptyChangeset, REMOVED_REPO_PAT diff --git a/rhodecode/model/user.py b/rhodecode/model/user.py index 8bb0f3b8..d2411c27 100644 --- a/rhodecode/model/user.py +++ b/rhodecode/model/user.py @@ -29,7 +29,7 @@ import traceback from pylons import url from pylons.i18n.translation import _ -from rhodecode.lib import safe_unicode +from rhodecode.lib.utils2 import safe_unicode, generate_api_key from rhodecode.lib.caching_query import FromCache from rhodecode.model import BaseModel @@ -40,7 +40,7 @@ from rhodecode.lib.exceptions import DefaultUserException, \ UserOwnsReposException from sqlalchemy.exc import DatabaseError -from rhodecode.lib import generate_api_key + from sqlalchemy.orm import joinedload log = logging.getLogger(__name__) |