summaryrefslogtreecommitdiff
path: root/main/models.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-11-02 09:47:02 -0500
committerDan McGee <dan@archlinux.org>2011-11-03 17:33:40 -0500
commite3e3e498765ab416a2902adf114cd3270e3eb12e (patch)
tree5046795ff9f2e4d33e4555f08d3462b3f2d06efe /main/models.py
parent9a5410ba4b622b68306de53abfa28b5a49e30107 (diff)
Add URL to todolist email
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main/models.py')
-rw-r--r--main/models.py5
1 files changed, 5 insertions, 0 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)