summaryrefslogtreecommitdiff
path: root/examples/beaker_caching/model.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-07-21 16:19:08 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-07-21 16:19:08 -0400
commit5ab558004c816deb258eef16b340c1cf9cda7776 (patch)
treea4bac66a7037813eccbe23d7206de187dec735cf /examples/beaker_caching/model.py
parent9e84c0251f3480deab96728f3642527f69076bcb (diff)
downloadsqlalchemy-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.py4
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