diff options
Diffstat (limited to 'mirrors')
-rw-r--r-- | mirrors/admin.py | 2 | ||||
-rw-r--r-- | mirrors/migrations/0002_mirrorurl_bandwidth.py | 20 | ||||
-rw-r--r-- | mirrors/models.py | 3 |
3 files changed, 23 insertions, 2 deletions
diff --git a/mirrors/admin.py b/mirrors/admin.py index d5c89c2a..16a97ea2 100644 --- a/mirrors/admin.py +++ b/mirrors/admin.py @@ -11,7 +11,7 @@ from .models import (Mirror, MirrorProtocol, MirrorUrl, MirrorRsync, class MirrorUrlForm(forms.ModelForm): class Meta: model = MirrorUrl - fields = ('url', 'country', 'active') + fields = ('url', 'country', 'bandwidth', 'active') def clean_url(self): # is this a valid-looking URL? diff --git a/mirrors/migrations/0002_mirrorurl_bandwidth.py b/mirrors/migrations/0002_mirrorurl_bandwidth.py new file mode 100644 index 00000000..f0118199 --- /dev/null +++ b/mirrors/migrations/0002_mirrorurl_bandwidth.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('mirrors', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='mirrorurl', + name='bandwidth', + field=models.FloatField(null=True, verbose_name=b'bandwidth (mbits)', blank=True), + preserve_default=True, + ), + ] diff --git a/mirrors/models.py b/mirrors/models.py index 641a6b97..820f3328 100644 --- a/mirrors/models.py +++ b/mirrors/models.py @@ -72,8 +72,9 @@ class MirrorUrl(models.Model): editable=False) has_ipv6 = models.BooleanField("IPv6 capable", default=False, editable=False) - created = models.DateTimeField(editable=False) active = models.BooleanField(default=True) + bandwidth = models.FloatField("bandwidth (mbits)", null=True, blank=True) + created = models.DateTimeField(editable=False) class Meta: verbose_name = 'mirror URL' |