Skip to content

Instantly share code, notes, and snippets.

@javierhonduco
Created July 28, 2014 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javierhonduco/027f357eb23cb6e4b4dd to your computer and use it in GitHub Desktop.
Save javierhonduco/027f357eb23cb6e4b4dd to your computer and use it in GitHub Desktop.
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