Created
December 8, 2012 14:02
-
-
Save niktto/4240370 to your computer and use it in GitHub Desktop.
Problem z okreslaniem kolumn na bazie listy stringów
This file contains hidden or 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 Character(Base): | |
__tablename__ = 'characters' | |
uid = Column(Integer, primary_key=True) | |
session = Column(Integer, ForeignKey('sessions.uid')) | |
created = Column(DateTime, default=datetime.datetime.utcnow) | |
name = Column(Unicode(255)) | |
# Body health | |
for part in BODY.keys(): | |
Column(part, Integer) | |
# Stats | |
for stat in STATS.keys(): | |
Column('stat_' + stat, Integer) | |
# Skills | |
for skill in SKILLS.keys(): | |
Column('skill_' + skill, Integer) | |
(...) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment