diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-07-21 16:19:08 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-07-21 16:19:08 -0400 |
commit | 5ab558004c816deb258eef16b340c1cf9cda7776 (patch) | |
tree | a4bac66a7037813eccbe23d7206de187dec735cf /examples/beaker_caching/model.py | |
parent | 9e84c0251f3480deab96728f3642527f69076bcb (diff) | |
download | sqlalchemy-5ab558004c816deb258eef16b340c1cf9cda7776.tar.gz |
- The beaker_caching example has been reorgnized
such that the Session, cache manager,
declarative_base are part of environment, and
custom cache code is portable and now within
"caching_query.py". This allows the example to
be easier to "drop in" to existing projects.
Diffstat (limited to 'examples/beaker_caching/model.py')
-rw-r--r-- | examples/beaker_caching/model.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/beaker_caching/model.py b/examples/beaker_caching/model.py index 6ea5e7904..c139d3284 100644 --- a/examples/beaker_caching/model.py +++ b/examples/beaker_caching/model.py @@ -10,7 +10,8 @@ City --(has a)--> Country """ from sqlalchemy import Column, Integer, String, ForeignKey from sqlalchemy.orm import relationship -from meta import Base, FromCache, Session, RelationshipCache +from caching_query import FromCache, RelationshipCache +from environment import Base, bootstrap class Country(Base): __tablename__ = 'country' @@ -102,3 +103,4 @@ cache_address_bits = RelationshipCache("default", "byid", PostalCode.city).\ RelationshipCache("default", "byid", Address.postal_code) ) +bootstrap()
\ No newline at end of file |