Mercurial > kallithea
annotate rhodecode/model/__init__.py @ 696:4432eb113b7f beta
template fixes
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 15 Nov 2010 17:08:42 +0100 |
parents | 1e757ac98988 |
children | 89b9037d68b7 |
rev | line source |
---|---|
0 | 1 """The application's model objects""" |
2 import logging | |
547
1e757ac98988
renamed project to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
473
diff
changeset
|
3 from rhodecode.model import meta |
0 | 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 | |
547
1e757ac98988
renamed project to rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
473
diff
changeset
|
16 #from rhodecode.config.environment import load_environment |
0 | 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 |