Mercurial > kallithea
comparison pylons_app/model/__init__.py @ 473:6b934c9607e7 celery
Improved testing scenarios. Made test env creator
Fixed hg_model error message
some other tweeks and fixes
Models fixe for uniq email, and removed some extra not needed imports from model main module
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 13 Sep 2010 01:23:58 +0200 |
parents | 564e40829f80 |
children |
comparison
equal
deleted
inserted
replaced
472:91292686c1ed | 473:6b934c9607e7 |
---|---|
1 """The application's model objects""" | 1 """The application's model objects""" |
2 import logging | 2 import logging |
3 import sqlalchemy as sa | |
4 from sqlalchemy import orm | |
5 from pylons_app.model import meta | 3 from pylons_app.model import meta |
6 from pylons_app.model.meta import Session | |
7 log = logging.getLogger(__name__) | 4 log = logging.getLogger(__name__) |
8 | |
9 # Add these two imports: | |
10 import datetime | |
11 from sqlalchemy import schema, types | |
12 | 5 |
13 def init_model(engine): | 6 def init_model(engine): |
14 """Call me before using any of the tables or classes in the model""" | 7 """Call me before using any of the tables or classes in the model""" |
15 log.info("INITIALIZING DB MODELS") | 8 log.info("INITIALIZING DB MODELS") |
16 meta.Base.metadata.bind = engine | 9 meta.Base.metadata.bind = engine |