|
Revision 152
(checked in by thejimmyg, 8 months ago)
|
Added a series of updates to SQLAlchemy code plus a fix to the OpenID support and an encoding problem with form.py
|
| Line | |
|---|
| 1 |
"""SQLAlchemy Metadata and Session object""" |
|---|
| 2 |
from sqlalchemy import MetaData |
|---|
| 3 |
from sqlalchemy.orm import scoped_session, sessionmaker |
|---|
| 4 |
|
|---|
| 5 |
import pylons |
|---|
| 6 |
|
|---|
| 7 |
__all__ = ['Session', 'metadata'] |
|---|
| 8 |
|
|---|
| 9 |
# SQLAlchemy database engine. Updated by model.init_model(). |
|---|
| 10 |
engine = None |
|---|
| 11 |
|
|---|
| 12 |
# SQLAlchemy session manager. Updated by model.init_model(). |
|---|
| 13 |
Session = None |
|---|
| 14 |
|
|---|
| 15 |
# Global metadata. If you have multiple databases with overlapping table |
|---|
| 16 |
# names, you'll need a metadata for each database. |
|---|
| 17 |
metadata = MetaData() |
|---|
| 18 |
|
|---|