diff options
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 ebb0368..580e1ee 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): |