diff options
author | Joar Wandborg <git@wandborg.com> | 2012-06-10 15:53:46 +0200 |
---|---|---|
committer | Joar Wandborg <git@wandborg.com> | 2012-06-10 15:53:46 +0200 |
commit | 879ff4bde6afaee8bf5bdc2a0e659d66e767d424 (patch) | |
tree | 71c9031f785f490f82d2fb7360b72b0f6007e2fe /mediagoblin/db/mongo | |
parent | a855e92a985a9bdc9c5062cad268eba3d8e19f84 (diff) | |
parent | fa72e516897a370b1e47e5f0ff17155990cd2414 (diff) | |
download | mediagoblin-879ff4bde6afaee8bf5bdc2a0e659d66e767d424.tar.lz mediagoblin-879ff4bde6afaee8bf5bdc2a0e659d66e767d424.tar.xz mediagoblin-879ff4bde6afaee8bf5bdc2a0e659d66e767d424.zip |
Merge remote-tracking branch 'is_derek/bug405_email_notifications_for_comments' into notifications-merge
Conflicts:
mediagoblin/db/mongo/migrations.py
Diffstat (limited to 'mediagoblin/db/mongo')
-rw-r--r-- | mediagoblin/db/mongo/migrations.py | 8 | ||||
-rw-r--r-- | mediagoblin/db/mongo/models.py | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/mediagoblin/db/mongo/migrations.py b/mediagoblin/db/mongo/migrations.py index 732f5846..569dec88 100644 --- a/mediagoblin/db/mongo/migrations.py +++ b/mediagoblin/db/mongo/migrations.py @@ -198,3 +198,11 @@ def convert_exif_media_data(database): del media_data['exif'] collection.save(document) + + +@RegisterMigration(13) +def user_add_wants_comment_notification(database): + """ + Add wants_comment_notification to user model + """ + add_table_field(database, 'users', 'wants_comment_notification', True) diff --git a/mediagoblin/db/mongo/models.py b/mediagoblin/db/mongo/models.py index 2e35a2b8..3f1363d5 100644 --- a/mediagoblin/db/mongo/models.py +++ b/mediagoblin/db/mongo/models.py @@ -62,6 +62,8 @@ class User(Document, UserMixin): we'll change this to a boolean with a key of 'active' and have a separate field for a reason the user's been disabled if that's appropriate... email_verified is already separate, after all.) + - wants_comment_notification: The user has selected that they want to be + notified when comments are posted on their media. - verification_key: If the user is awaiting email verification, the user will have to provide this key (which will be encoded in the presented URL) in order to confirm their email as active. @@ -80,6 +82,7 @@ class User(Document, UserMixin): 'pw_hash': unicode, 'email_verified': bool, 'status': unicode, + 'wants_comment_notification': bool, 'verification_key': unicode, 'is_admin': bool, 'url': unicode, @@ -93,6 +96,7 @@ class User(Document, UserMixin): default_values = { 'created': datetime.datetime.utcnow, 'email_verified': False, + 'wants_comment_notification': True, 'status': u'needs_email_verification', 'is_admin': False} |