Skip to content

Instantly share code, notes, and snippets.

@seb-thomas
Created October 30, 2012 16:58
Show Gist options
  • Save seb-thomas/3981525 to your computer and use it in GitHub Desktop.
Save seb-thomas/3981525 to your computer and use it in GitHub Desktop.
more than one table
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