summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest/migrations
diff options
context:
space:
mode:
authorMagnus Hagander2016-02-12 17:03:26 +0000
committerMagnus Hagander2016-02-12 17:03:26 +0000
commit986048a270afd56ef4f504d8e417d81f28970362 (patch)
treeddd42a69157676e6caf311f1ed133ac30ae3011e /pgcommitfest/commitfest/migrations
parent6dec4d85a2eb96a5cbf502f282e9087c9f9081a5 (diff)
Implement notifications
This makes it possible to receive notifications (via email) when a patch has been updated. It's possible to subscribe to notifications on a specific patch. It is also possible to set the user profile up so that one receives notifications for all patches where one is author, reviewer or committer on. Notifications are, of course, only sent when other people make modifications to the entry.
Diffstat (limited to 'pgcommitfest/commitfest/migrations')
-rw-r--r--pgcommitfest/commitfest/migrations/0002_notifications.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/pgcommitfest/commitfest/migrations/0002_notifications.py b/pgcommitfest/commitfest/migrations/0002_notifications.py
new file mode 100644
index 0000000..b94daed
--- /dev/null
+++ b/pgcommitfest/commitfest/migrations/0002_notifications.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+from django.conf import settings
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ('commitfest', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='PendingNotification',
+ fields=[
+ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+ ('history', models.ForeignKey(to='commitfest.PatchHistory')),
+ ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
+ ],
+ ),
+ migrations.AddField(
+ model_name='patch',
+ name='subscribers',
+ field=models.ManyToManyField(related_name='patch_subscriber', to=settings.AUTH_USER_MODEL, blank=True),
+ ),
+ ]