diff options
author | Dan McGee <dan@archlinux.org> | 2010-03-06 09:42:08 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-03-06 10:13:28 -0600 |
commit | 93e0552e3dcaa3b2feb82a5dddc0ae43d82eeee0 (patch) | |
tree | 96f0ab9a89458692a209597efca6c52fd2ce366d /main/models.py | |
parent | cefb969d3c7d0d0380f63fcd50906be3b2825b4d (diff) |
Mirror tiering enhancements
Add ability to track tier and upstream mirror in the database.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'main/models.py')
-rw-r--r-- | main/models.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py index dd37f885..eff55798 100644 --- a/main/models.py +++ b/main/models.py @@ -51,8 +51,17 @@ class PackageManager(models.Manager): ############################# ### General Model Classes ### ############################# +TIER_CHOICES = ( + (0, 'Tier 0'), + (1, 'Tier 1'), + (2, 'Tier 2'), + (-1, 'Untiered'), +) + class Mirror(models.Model): name = models.CharField(max_length=255) + tier = models.SmallIntegerField(default=2, choices=TIER_CHOICES) + upstream = models.ForeignKey('self', null=True, blank=True) country = models.CharField(max_length=255, db_index=True) admin_email = models.EmailField(max_length=255, blank=True) notes = models.CharField(max_length=255, blank=True) |