summaryrefslogtreecommitdiff
path: root/examples/inheritance
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-11-09 19:42:01 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-11-09 19:42:01 -0500
commit546015e6e147130c4f21c87ec9e1537d9f71c3fb (patch)
treec7b6cd29f5ee774f8fdd9acbdafcfa12601473d2 /examples/inheritance
parentb03961b8243fa731fdcdbaffa7acd3c718fba0d9 (diff)
downloadsqlalchemy-546015e6e147130c4f21c87ec9e1537d9f71c3fb.tar.gz
- add a new sphinx extension "viewsource". takes advantage of part of the viewcode extension
to allow ad-hoc display of the source of any file, as well as a "directory listing" structure. - reorganize examples/ to take advantage of new extension. in particular, keep moving all the descriptive text for files etc. into module docstrings, taking more advantage of self-documentation.
Diffstat (limited to 'examples/inheritance')
-rw-r--r--examples/inheritance/__init__.py2
-rw-r--r--examples/inheritance/concrete.py2
-rw-r--r--examples/inheritance/joined.py2
-rw-r--r--examples/inheritance/single.py2
4 files changed, 7 insertions, 1 deletions
diff --git a/examples/inheritance/__init__.py b/examples/inheritance/__init__.py
index 09519a679..eb3e843ca 100644
--- a/examples/inheritance/__init__.py
+++ b/examples/inheritance/__init__.py
@@ -1,4 +1,6 @@
"""Working examples of single-table, joined-table, and concrete-table
inheritance as described in :ref:`datamapping_inheritance`.
+.. autosource::
+
""" \ No newline at end of file
diff --git a/examples/inheritance/concrete.py b/examples/inheritance/concrete.py
index b05afa5ea..f9bdc81b4 100644
--- a/examples/inheritance/concrete.py
+++ b/examples/inheritance/concrete.py
@@ -1,3 +1,5 @@
+"""Concrete (table-per-class) inheritance example."""
+
from sqlalchemy import create_engine, MetaData, Table, Column, Integer, \
String
from sqlalchemy.orm import mapper, sessionmaker, polymorphic_union
diff --git a/examples/inheritance/joined.py b/examples/inheritance/joined.py
index 8283ef05d..6e0205e04 100644
--- a/examples/inheritance/joined.py
+++ b/examples/inheritance/joined.py
@@ -1,4 +1,4 @@
-"""this example illustrates a polymorphic load of two classes"""
+"""Joined-table (table-per-subclass) inheritance example."""
from sqlalchemy import Table, Column, Integer, String, \
ForeignKey, create_engine, inspect, or_
diff --git a/examples/inheritance/single.py b/examples/inheritance/single.py
index b445f74a6..22a6fe027 100644
--- a/examples/inheritance/single.py
+++ b/examples/inheritance/single.py
@@ -1,3 +1,5 @@
+"""Single-table inheritance example."""
+
from sqlalchemy import MetaData, Table, Column, Integer, String, \
ForeignKey, create_engine
from sqlalchemy.orm import mapper, relationship, sessionmaker