Created
June 3, 2013 18:25
-
-
Save Drvanon/5700177 to your computer and use it in GitHub Desktop.
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
from sqlalchemy import All_The_Bullshit_I_Need | |
class Type(Base): | |
id = Column(Integer, primary_key=True) | |
name = Column(String) | |
class Building(Base): | |
id = Column(Integer, primary_key=True) | |
to_id = Column(Integer, ForeignKey('types.id')) | |
from_id = Column(Integer, ForeignKey('types.id')) | |
to = relationship("Type") | |
from = relationship("Type") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment