summaryrefslogtreecommitdiff
path: root/meetingtools/apps
diff options
context:
space:
mode:
authorJohan Lundberg <lundberg@nordu.net>2014-04-02 17:25:19 +0200
committerJohan Lundberg <lundberg@nordu.net>2014-04-02 17:25:19 +0200
commit807973debd5cb00a4250fe88f7037dcd3cd3133b (patch)
tree62120b24397943411920dbbd0a8a2f74800fd429 /meetingtools/apps
parent6acc69b519422171eb661edbe192bf2074ce6d8f (diff)
Fixed download url for content objects.
Diffstat (limited to 'meetingtools/apps')
-rw-r--r--meetingtools/apps/content/models.py6
1 files changed, 4 insertions, 2 deletions
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):