diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-07-28 17:05:50 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-07-28 17:05:50 -0400 |
| commit | 22ba1c43b792953ae6f791512d276739c8c09eae (patch) | |
| tree | bdf9f639b01426a8a2e1c8c61d35533026dd4265 /examples/custom_attributes | |
| parent | 27913554a85c308d81e6c018669d0246ceecc639 (diff) | |
| download | sqlalchemy-22ba1c43b792953ae6f791512d276739c8c09eae.tar.gz | |
-whitespace bonanza, contd
Diffstat (limited to 'examples/custom_attributes')
| -rw-r--r-- | examples/custom_attributes/custom_management.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/custom_attributes/custom_management.py b/examples/custom_attributes/custom_management.py index 5ab2236e7..12b745db6 100644 --- a/examples/custom_attributes/custom_management.py +++ b/examples/custom_attributes/custom_management.py @@ -1,10 +1,10 @@ """Illustrates customized class instrumentation, using the :mod:`sqlalchemy.ext.instrumentation` extension package. -In this example, mapped classes are modified to +In this example, mapped classes are modified to store their state in a dictionary attached to an attribute named "_goofy_dict", instead of using __dict__. -this example illustrates how to replace SQLAlchemy's class +this example illustrates how to replace SQLAlchemy's class descriptors with a user-defined system. @@ -66,12 +66,12 @@ class MyClass(object): if __name__ == '__main__': meta = MetaData(create_engine('sqlite://')) - table1 = Table('table1', meta, - Column('id', Integer, primary_key=True), + table1 = Table('table1', meta, + Column('id', Integer, primary_key=True), Column('name', Text)) - table2 = Table('table2', meta, - Column('id', Integer, primary_key=True), - Column('name', Text), + table2 = Table('table2', meta, + Column('id', Integer, primary_key=True), + Column('name', Text), Column('t1id', Integer, ForeignKey('table1.id'))) meta.create_all() |
