Created
July 28, 2014 12:39
-
-
Save javierhonduco/027f357eb23cb6e4b4dd 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
class Bug(db.Model, RoleMixin): | |
id = db.Column(db.Integer(), primary_key=True) | |
description = db.Column(db.String(300)) | |
#public? | |
user_id = db.Column(db.Integer, db.ForeignKey('user.id')) | |
user = db.relationship('User', backref=db.backref('bugs', lazy='dynamic')) | |
def __unicode__(self): | |
return '%d' % self.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment