From 66e9c6f8b2593cb36adce28a351849a62a9e04b5 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 17 Nov 2013 00:03:38 +0100 Subject: Added comments in models.py. --- pyaggr3g470r/models.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'pyaggr3g470r') 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 __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) -- cgit