From 807973debd5cb00a4250fe88f7037dcd3cd3133b Mon Sep 17 00:00:00 2001 From: Johan Lundberg Date: Wed, 2 Apr 2014 17:25:19 +0200 Subject: Fixed download url for content objects. --- meetingtools/apps/content/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'meetingtools/apps/content') diff --git a/meetingtools/apps/content/models.py b/meetingtools/apps/content/models.py index 5b076b3..621111f 100644 --- a/meetingtools/apps/content/models.py +++ b/meetingtools/apps/content/models.py @@ -43,9 +43,11 @@ class Content(models.Model): def by_name(acc, name): return Content.objects.get(sco__acc=acc, name=name) + def go_url(self): + return "%s%s" % (self.sco.acc.url, self.urlpath.strip("/")) + def download_url(self): - url = self.sco.acc.url - return "%s%s" % (url, self.urlpath) + return "%s%s/output/%s.zip?download=zip" % (self.sco.acc.url, self.urlpath.strip("/"), self.urlpath.strip("/")) @staticmethod def create(acc, api, row): -- cgit v1.1