diff options
author | Dusty Phillips <buchuki@gmail.com> | 2009-08-12 15:36:35 -0600 |
---|---|---|
committer | Dusty Phillips <buchuki@gmail.com> | 2009-08-12 15:36:35 -0600 |
commit | 756751ab7f5c8329630a766b7718790c2790a845 (patch) | |
tree | d90d3ed768c4f5b192de44749295e04a92caf398 /main/models.py | |
parent | a085da1c22f7cc8ea245ec2fc018cd5eaadc3032 (diff) |
Add a couple fields to mirror admin at Aaron's request
Diffstat (limited to 'main/models.py')
-rw-r--r-- | main/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py index ebb0368d..580e1eec 100644 --- a/main/models.py +++ b/main/models.py @@ -62,6 +62,10 @@ class Mirror(models.Model): def __unicode__(self): return self.name + def supported_protocols(self): + protocols = MirrorProtocol.objects.filter(urls__mirror=self).distinct() + return ", ".join([p.protocol for p in protocols]) + class MirrorProtocol(models.Model): protocol = models.CharField(max_length=10, unique=True) def __unicode__(self): |