summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/models.py5
-rw-r--r--templates/todolists/email_notification.txt9
2 files changed, 10 insertions, 4 deletions
diff --git a/main/models.py b/main/models.py
index d55a9673..972b098c 100644
--- a/main/models.py
+++ b/main/models.py
@@ -470,6 +470,11 @@ class Todolist(models.Model):
def get_absolute_url(self):
return '/todo/%i/' % self.id
+ def get_full_url(self, proto='https'):
+ '''get a URL suitable for things like email including the domain'''
+ domain = Site.objects.get_current().domain
+ return '%s://%s%s' % (proto, domain, self.get_absolute_url())
+
class TodolistPkg(models.Model):
list = models.ForeignKey(Todolist)
pkg = models.ForeignKey(Package)
diff --git a/templates/todolists/email_notification.txt b/templates/todolists/email_notification.txt
index 10b50f64..8b22b465 100644
--- a/templates/todolists/email_notification.txt
+++ b/templates/todolists/email_notification.txt
@@ -1,10 +1,11 @@
-{% autoescape off %}The todo list {{ todolist.name }} has had the following packages added to it for which you are a maintainer:
+{% autoescape off %}The todo list "{{ todolist.name }}" has had the following packages added to it for which you are a maintainer:
{% for tpkg in todo_packages %}
* {{ tpkg.pkg.repo.name|lower }}/{{ tpkg.pkg.pkgname }} ({{ tpkg.pkg.arch.name }}) - {{ tpkg.pkg.get_full_url }}{% endfor %}
Todo list information:
-Creator: {{todolist.creator.get_full_name}}
-Name: {{todolist.name}}
+Name: {{ todolist.name }}
+URL: {{ todolist.get_full_url }}
+Creator: {{ todolist.creator.get_full_name }}
Description:
-{{todolist.description|striptags|wordwrap:69}}{% endautoescape %}
+{{ todolist.description|striptags|wordwrap:78 }}{% endautoescape %}