##// END OF EJS Templates
utils: make sure we don't import any models inside utils
marcink -
r262:09af6d74 default
parent child Browse files
Show More
@@ -52,8 +52,7 b' from rhodecode.model import meta'
52 from rhodecode.model.db import (
52 from rhodecode.model.db import (
53 Repository, User, RhodeCodeUi, UserLog, RepoGroup, UserGroup)
53 Repository, User, RhodeCodeUi, UserLog, RepoGroup, UserGroup)
54 from rhodecode.model.meta import Session
54 from rhodecode.model.meta import Session
55 from rhodecode.model.repo_group import RepoGroupModel
55
56 from rhodecode.model.settings import VcsSettingsModel, SettingsModel
57
56
58 log = logging.getLogger(__name__)
57 log = logging.getLogger(__name__)
59
58
@@ -384,6 +383,8 b' def config_data_from_db(clear_session=Tr'
384 Read the configuration data from the database and return configuration
383 Read the configuration data from the database and return configuration
385 tuples.
384 tuples.
386 """
385 """
386 from rhodecode.model.settings import VcsSettingsModel
387
387 config = []
388 config = []
388
389
389 sa = meta.Session()
390 sa = meta.Session()
@@ -467,6 +468,7 b' def set_rhodecode_config(config):'
467
468
468 :param config:
469 :param config:
469 """
470 """
471 from rhodecode.model.settings import SettingsModel
470 app_settings = SettingsModel().get_all_settings()
472 app_settings = SettingsModel().get_all_settings()
471
473
472 for k, v in app_settings.items():
474 for k, v in app_settings.items():
@@ -481,6 +483,7 b' def map_groups(path):'
481
483
482 :param paths: full path to repository
484 :param paths: full path to repository
483 """
485 """
486 from rhodecode.model.repo_group import RepoGroupModel
484 sa = meta.Session()
487 sa = meta.Session()
485 groups = path.split(Repository.NAME_SEP)
488 groups = path.split(Repository.NAME_SEP)
486 parent = None
489 parent = None
@@ -525,6 +528,9 b' def repo2db_mapper(initial_repo_list, re'
525 """
528 """
526 from rhodecode.model.repo import RepoModel
529 from rhodecode.model.repo import RepoModel
527 from rhodecode.model.scm import ScmModel
530 from rhodecode.model.scm import ScmModel
531 from rhodecode.model.repo_group import RepoGroupModel
532 from rhodecode.model.settings import SettingsModel
533
528 sa = meta.Session()
534 sa = meta.Session()
529 repo_model = RepoModel()
535 repo_model = RepoModel()
530 user = User.get_first_admin()
536 user = User.get_first_admin()
General Comments 0
You need to be logged in to leave comments. Login now