[extensions-web: 58/75] Email the reviewer when his extension is reviewed.
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web: 58/75] Email the reviewer when his extension is reviewed.
- Date: Fri, 23 Sep 2011 03:19:18 +0000 (UTC)
commit 1795b826bc8bdfee5196c96612650fbf0bb4e401
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Sep 22 01:28:21 2011 -0400
Email the reviewer when his extension is reviewed.
sweettooth/review/views.py | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/review/views.py b/sweettooth/review/views.py
index 6dc79ef..a1998aa 100644
--- a/sweettooth/review/views.py
+++ b/sweettooth/review/views.py
@@ -160,3 +160,33 @@ def send_email_on_submitted(sender, version):
message=on_submitted_template % data,
from_email=settings.EMAIL_SENDER,
recipient_list=reviewers)
+
+on_reviewed_subject = u"""
+GNOME Shell Extensions \N{EM DASH} Your extension, "%(name)s", v%(ver)d has been reviewed.
+""".strip()
+
+on_reviewed_template = u"""
+Your extension, "%(name)s", version %(ver)d has been reviewed. You can see the review here:
+
+%(url)s
+
+Please use the review page to follow up with any comments or concerns.
+""".strip()
+
+ receiver(models.reviewed)
+def send_email_on_reviewed(sender, version, review):
+ if review.reviewer == version.creator:
+ # Don't spam the creator with his own review
+ return
+
+ extension = version.extension
+
+ data = dict(ver=version.version,
+ name=extension.name,
+ creator=extension.creator,
+ url=reverse('review-version', kwargs=dict(pk=version.pk)))
+
+ send_mail(subject=on_reviewed_subject % data,
+ message=on_reviewed_template % data,
+ from_email=settings.EMAIL_SENDER,
+ recipient_list=[extension.creator.email])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]