Mercurial > kallithea
comparison rhodecode/model/__init__.py @ 547:1e757ac98988
renamed project to rhodecode
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 06 Oct 2010 03:18:16 +0200 |
parents | pylons_app/model/__init__.py@6b934c9607e7 |
children | 89b9037d68b7 |
comparison
equal
deleted
inserted
replaced
546:7c2f5e4d7bbf | 547:1e757ac98988 |
---|---|
1 """The application's model objects""" | |
2 import logging | |
3 from rhodecode.model import meta | |
4 log = logging.getLogger(__name__) | |
5 | |
6 def init_model(engine): | |
7 """Call me before using any of the tables or classes in the model""" | |
8 log.info("INITIALIZING DB MODELS") | |
9 meta.Base.metadata.bind = engine | |
10 #meta.Base2.metadata.bind = engine2 | |
11 | |
12 #THIS IS A TEST FOR EXECUTING SCRIPT AND LOAD PYLONS APPLICATION GLOBALS | |
13 #from paste.deploy import appconfig | |
14 #from pylons import config | |
15 #from sqlalchemy import engine_from_config | |
16 #from rhodecode.config.environment import load_environment | |
17 # | |
18 #conf = appconfig('config:development.ini', relative_to = './../../') | |
19 #load_environment(conf.global_conf, conf.local_conf) | |
20 # | |
21 #engine = engine_from_config(config, 'sqlalchemy.') | |
22 #init_model(engine) | |
23 # DO SOMETHING |