diff options
author | Dan McGee <dan@archlinux.org> | 2012-11-12 21:37:08 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-11-12 21:37:08 -0600 |
commit | 92837c93acc66056391dd0b98515b89f8fc49691 (patch) | |
tree | 0c4019df6b0bf3913b8956885782f493a6049d53 /mirrors/models.py | |
parent | 2339f42ef0f95e55d99be47ed2327c3d127ebc29 (diff) |
Prefetch the available protocols on the mirror overview page
Otherwise we are doing one query per mirror, which at this point is over
100 separate queries.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors/models.py')
-rw-r--r-- | mirrors/models.py | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/mirrors/models.py b/mirrors/models.py index 384668b8..0179d5bf 100644 --- a/mirrors/models.py +++ b/mirrors/models.py @@ -33,11 +33,6 @@ class Mirror(models.Model): def __unicode__(self): return self.name - def supported_protocols(self): - protocols = MirrorProtocol.objects.filter( - urls__mirror=self).order_by('protocol').distinct() - return sorted(protocols) - def downstream(self): return Mirror.objects.filter(upstream=self).order_by('name') |