diff options
author | Johan Lundberg <lundberg@nordu.net> | 2014-04-02 17:25:19 +0200 |
---|---|---|
committer | Johan Lundberg <lundberg@nordu.net> | 2014-04-02 17:25:19 +0200 |
commit | 807973debd5cb00a4250fe88f7037dcd3cd3133b (patch) | |
tree | 62120b24397943411920dbbd0a8a2f74800fd429 /meetingtools/apps | |
parent | 6acc69b519422171eb661edbe192bf2074ce6d8f (diff) |
Fixed download url for content objects.
Diffstat (limited to 'meetingtools/apps')
-rw-r--r-- | meetingtools/apps/content/models.py | 6 |
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): |