summaryrefslogtreecommitdiffstats
path: root/mirrors/models.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-04-10 21:00:17 -0500
committerDan McGee <dan@archlinux.org>2013-04-10 21:03:09 -0500
commit06e1e857abfdf7f95661d337ce3c315bd51fb837 (patch)
tree7d14e91e1b2f953c6ecfccaca4f315837f4e68a3 /mirrors/models.py
parent90e969a160e1ec028ded1ca9b33975ec50fed154 (diff)
downloadarchweb-06e1e857abfdf7f95661d337ce3c315bd51fb837.tar.gz
archweb-06e1e857abfdf7f95661d337ce3c315bd51fb837.zip
Allow mirror rsync IPs to be IPv4/IPv6 addresses or networksrelease_2013-04-10
This gives us a bunch more flexibility on this field, and now supports all the options that the rsync config file supports. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors/models.py')
-rw-r--r--mirrors/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mirrors/models.py b/mirrors/models.py
index b0da5616..791b0078 100644
--- a/mirrors/models.py
+++ b/mirrors/models.py
@@ -6,6 +6,7 @@ from django.db import models
from django.db.models.signals import pre_save
from django_countries import CountryField
+from .fields import IPNetworkField
from main.utils import set_created_field
@@ -105,7 +106,7 @@ class MirrorUrl(models.Model):
class MirrorRsync(models.Model):
# max length is 40 chars for full-form IPv6 addr + subnet
- ip = models.CharField("IP", max_length=44)
+ ip = IPNetworkField("IP")
mirror = models.ForeignKey(Mirror, related_name="rsync_ips")
created = models.DateTimeField(editable=False)