Created
October 30, 2012 16:58
-
-
Save seb-thomas/3981525 to your computer and use it in GitHub Desktop.
more than one table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Shoe(Base): | |
""" | |
Container class for our SQLAlchemy object that is actually | |
from the thbookdata django app model | |
""" | |
__tablename__ = 'bookdata_shoe' | |
__table_args__ = {'autoload': True} | |
id = Column('id', Integer, primary_key=True) | |
class Brand(Base): | |
__tablename__ = 'bookdata_brand' | |
__table_args__ = {'autoload': True} | |
id = Column('id', Integer, primary_key=True) | |
class Root(object): | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment