summaryrefslogtreecommitdiffstats
path: root/mirrors/models.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-01-14 01:00:11 -0600
committerDan McGee <dan@archlinux.org>2013-01-14 01:05:54 -0600
commit6f0ae6746baea657ee6d7c21ac0813a04f825443 (patch)
treebccc596760284ed7d04e08408ec7cf73edd50485 /mirrors/models.py
parent5b8b6991b0b9f8174f153fe4b46376451b222cc1 (diff)
downloadarchweb-6f0ae6746baea657ee6d7c21ac0813a04f825443.tar.gz
archweb-6f0ae6746baea657ee6d7c21ac0813a04f825443.zip
Drop country column from mirror table
We now always look for this information at the URL level, not the mirror level. This simplifies quite a bit of code in and around the mirror views. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors/models.py')
-rw-r--r--mirrors/models.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/mirrors/models.py b/mirrors/models.py
index 0179d5bf..ca421d13 100644
--- a/mirrors/models.py
+++ b/mirrors/models.py
@@ -17,7 +17,6 @@ class Mirror(models.Model):
name = models.CharField(max_length=255, unique=True)
tier = models.SmallIntegerField(default=2, choices=TIER_CHOICES)
upstream = models.ForeignKey('self', null=True, on_delete=models.SET_NULL)
- country = CountryField(blank=True, db_index=True)
admin_email = models.EmailField(max_length=255, blank=True)
alternate_email = models.EmailField(max_length=255, blank=True)
public = models.BooleanField(default=True)
@@ -28,7 +27,7 @@ class Mirror(models.Model):
notes = models.TextField(blank=True)
class Meta:
- ordering = ('country', 'name')
+ ordering = ('name',)
def __unicode__(self):
return self.name
@@ -75,10 +74,6 @@ class MirrorUrl(models.Model):
def hostname(self):
return urlparse(self.url).hostname
- @property
- def real_country(self):
- return self.country or self.mirror.country
-
def clean(self):
try:
# Auto-map the protocol field by looking at the URL