diff options
author | Michael Trier <mtrier@gmail.com> | 2009-03-31 22:31:08 +0000 |
---|---|---|
committer | Michael Trier <mtrier@gmail.com> | 2009-03-31 22:31:08 +0000 |
commit | 6010afb28f95c7050ca48ddd2e6f65ca6cbae5a1 (patch) | |
tree | 46259c03c209a89702c32c939c8ea035edee9425 /examples/postgis/postgis.py | |
parent | 832ea82fefa366f4717e889511f66ecfce3313de (diff) | |
download | sqlalchemy-6010afb28f95c7050ca48ddd2e6f65ca6cbae5a1.tar.gz |
Lots of fixes to the code examples to specify imports explicitly.
Explicit imports make it easier for users to understand the examples.
Additionally a lot of the examples were fixed to work with the changes in the
0.5.x code base. One small correction to the Case expression. Thanks a bunch
to Adam Lowry! Fixes #717.
Diffstat (limited to 'examples/postgis/postgis.py')
-rw-r--r-- | examples/postgis/postgis.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/postgis/postgis.py b/examples/postgis/postgis.py index 802aa0ea9..c482d8256 100644 --- a/examples/postgis/postgis.py +++ b/examples/postgis/postgis.py @@ -28,11 +28,10 @@ Includes: * a standalone operator example. The implementation is limited to only public, well known -and simple to use extension points, with the exception -of one temporary monkeypatch in the DDL extension. -Future SQLAlchemy expansion points may allow more seamless -integration of some features. - +and simple to use extension points. Future SQLAlchemy +expansion points may allow more seamless integration of +some features. + """ from sqlalchemy.orm.interfaces import AttributeExtension @@ -227,8 +226,9 @@ def GISColumn(*args, **kw): # illustrate usage if __name__ == '__main__': - from sqlalchemy import * - from sqlalchemy.orm import * + from sqlalchemy import (create_engine, MetaData, Column, Integer, String, + func, literal, select) + from sqlalchemy.orm import sessionmaker, column_property from sqlalchemy.ext.declarative import declarative_base engine = create_engine('postgres://scott:tiger@localhost/gistest', echo=True) |