diff options
author | Marcin Kuzminski <marcin@python-works.com> | 2010-11-24 17:15:33 +0100 |
---|---|---|
committer | Marcin Kuzminski <marcin@python-works.com> | 2010-11-24 17:15:33 +0100 |
commit | 887c3a57b491ffd429ff6241cb6933f889df628a (patch) | |
tree | db40b80cc00a9fd5d11ab22dcebe5bd35f19a7c5 /rhodecode/model/__init__.py | |
parent | 5d4931b28f1a77130f48d9cd9eca7cf754b9f7b9 (diff) |
fixed Example celery config to ampq,
fixed session problems on models and celery,
implemented one base model as a parent for other
--HG--
branch : beta
Diffstat (limited to 'rhodecode/model/__init__.py')
-rw-r--r-- | rhodecode/model/__init__.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rhodecode/model/__init__.py b/rhodecode/model/__init__.py index 01c26f7d..ffffce20 100644 --- a/rhodecode/model/__init__.py +++ b/rhodecode/model/__init__.py @@ -21,3 +21,12 @@ def init_model(engine): #engine = engine_from_config(config, 'sqlalchemy.') #init_model(engine) # DO SOMETHING + + +class BaseModel(object): + + def __init__(self, sa=None): + if sa is not None: + self.sa = sa + else: + self.sa = meta.Session() |