diff options
author | Sam | 2013-12-31 08:52:23 +0000 |
---|---|---|
committer | Sam | 2013-12-31 08:52:23 +0000 |
commit | a9f63aadeeedb7c28bbcd16396c8c6e7d5cbbfd0 (patch) | |
tree | aca928b31c4f0d7b9efac51a76b427690089fd76 /wqflask/wqflask/model.py | |
parent | 957ec58b605af421947335197ed09eddf72479a0 (diff) | |
download | genenetwork2-a9f63aadeeedb7c28bbcd16396c8c6e7d5cbbfd0.tar.gz |
Finished code to remove a trait or multiple traits from a collection
Wrote code to make buttons a little cleaner and more obvious when dealing with collections (they now enable themselves when traits that can be added or removed to/from a collection are selected)
Diffstat (limited to 'wqflask/wqflask/model.py')
-rw-r--r-- | wqflask/wqflask/model.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/wqflask/wqflask/model.py b/wqflask/wqflask/model.py index 192aedd0..e588e78a 100644 --- a/wqflask/wqflask/model.py +++ b/wqflask/wqflask/model.py @@ -10,6 +10,8 @@ from flask.ext.sqlalchemy import SQLAlchemy from wqflask import app +import sqlalchemy + from sqlalchemy import (Column, Integer, String, Table, ForeignKey, Unicode, Boolean, DateTime, Text, Index) from sqlalchemy.orm import relationship, backref @@ -153,3 +155,7 @@ class UserCollection(Base): def num_members(self): print("members are:", json.loads(self.members)) return len(json.loads(self.members)) + + + def members_as_set(self): + return set(json.loads(self.members)) |