diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-11-17 00:03:38 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-11-17 00:03:38 +0100 |
commit | 66e9c6f8b2593cb36adce28a351849a62a9e04b5 (patch) | |
tree | aeb48850ecac44f8d4e9bc54c9037fccab3bcf03 /pyaggr3g470r/models.py | |
parent | Removed old module for the MongoDB connection. (diff) | |
download | newspipe-66e9c6f8b2593cb36adce28a351849a62a9e04b5.tar.gz newspipe-66e9c6f8b2593cb36adce28a351849a62a9e04b5.tar.bz2 newspipe-66e9c6f8b2593cb36adce28a351849a62a9e04b5.zip |
Added comments in models.py.
Diffstat (limited to 'pyaggr3g470r/models.py')
-rw-r--r-- | pyaggr3g470r/models.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pyaggr3g470r/models.py b/pyaggr3g470r/models.py index 38d1e6ec..3ec0e6fe 100644 --- a/pyaggr3g470r/models.py +++ b/pyaggr3g470r/models.py @@ -20,9 +20,9 @@ # along with this program. If not, see <http://www.gnu.org/licenses/> __author__ = "Cedric Bonhomme" -__version__ = "$Revision: 0.2 $" +__version__ = "$Revision: 0.3 $" __date__ = "$Date: 2013/11/05 $" -__revision__ = "$Date: 2013/13/05 $" +__revision__ = "$Date: 2013/11/16 $" __copyright__ = "Copyright (c) Cedric Bonhomme" __license__ = "GPLv3" @@ -35,6 +35,9 @@ from flask.ext.login import UserMixin import bson.objectid class User(Document, UserMixin): + """ + Defines the model for a user. + """ firstname = StringField(required=True) lastname = StringField(required = True) email = EmailField(required=True, unique=True) @@ -56,6 +59,9 @@ class User(Document, UserMixin): return self.email class Feed(EmbeddedDocument): + """ + Defines the model for a feed. + """ oid = ObjectIdField(default=bson.objectid.ObjectId , primary_key=True) title = StringField(required=True) link = StringField(required=True, unique=True) @@ -75,6 +81,9 @@ class Feed(EmbeddedDocument): return 'Feed: %s' % self.title class Article(Document): + """ + Defines the model for an article. + """ date = DateTimeField(required=True) link = StringField(required=True) title = StringField(required=True) |