diff options
author | Leif Johansson <leifj@sunet.se> | 2012-10-08 13:52:40 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2012-10-08 13:52:40 +0200 |
commit | bd8cf29f8c2f0c8298e7bf324f865bd7aab722b3 (patch) | |
tree | 32f0bf109a8afa3d26e95a5a6c1095c359c722ff /meetingtools/apps/cluster | |
parent | 75a8540989bae973093f0589b32274264f9cad2e (diff) |
- download-link
- don't catch exception - unlock in finally
Diffstat (limited to 'meetingtools/apps/cluster')
-rw-r--r-- | meetingtools/apps/cluster/models.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/meetingtools/apps/cluster/models.py b/meetingtools/apps/cluster/models.py index 3c65d57..592b384 100644 --- a/meetingtools/apps/cluster/models.py +++ b/meetingtools/apps/cluster/models.py @@ -16,13 +16,16 @@ class ACCluster(models.Model): name = CharField(max_length=128,blank=True,unique=True) default_template_sco_id = IntegerField(blank=True,unique=True) domain_match = TextField() - + def __unicode__(self): return self.url - + def make_url(self,path=""): return "%s%s" % (self.url,path) - + + def make_dl_url(self,path=""): + return "%s%s/output/%s.zip?download=zip" % (self,path.strip("/"),path.strip("/")) + def acc_for_user(user): (local,domain) = user.username.split('@') if not domain: |