diff options
| author | Teddy Wing | 2015-01-31 18:17:03 -0500 | 
|---|---|---|
| committer | Teddy Wing | 2015-01-31 18:17:03 -0500 | 
| commit | 0a730ea1962522bf5fb2db41a87ac172dc51750e (patch) | |
| tree | 40076b29b591fbfd91a51a0564ade3238f94c2d9 /modules/user/models.py | |
| parent | 7476e4c756b41407387f025ba4478e1b80fb8065 (diff) | |
| download | edu-net-0a730ea1962522bf5fb2db41a87ac172dc51750e.tar.bz2 | |
Add Interest models
Two new models:
* Interest
* UserInterest (through model)
These allow us to record interests/passions and associate them with
users.
Diffstat (limited to 'modules/user/models.py')
| -rw-r--r-- | modules/user/models.py | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/modules/user/models.py b/modules/user/models.py index 0731a67..138651a 100644 --- a/modules/user/models.py +++ b/modules/user/models.py @@ -15,6 +15,9 @@ class User(db.Model):      first_name = db.Column(db.String(50), nullable=False, default='')      last_name = db.Column(db.String(50), nullable=False, default='') +    interests = db.relationship('Interest', backref=db.backref('user', +        lazy='dynamic')) +      def is_active(self):        return self.is_enabled | 
