summaryrefslogtreecommitdiff
path: root/mirrors/admin.py
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2011-12-04 23:07:59 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2011-12-04 23:07:59 -0300
commit988c2c6d400b3721464c2891891807d504b076b0 (patch)
tree013dc3d676edad701d0d3bbd239bc2df0cdf76b4 /mirrors/admin.py
parent60a1fc6cc4cef0b9eed58ea4f0ca003b76ec382a (diff)
parent183c4d9cefa95f46c3fa3a6936f837542426eac2 (diff)
Merge branch 'master' of ssh://gparabola/parabolaweb
Conflicts: local_settings.py.example media/archweb.css packages/templatetags/package_extras.py public/views.py templates/packages/details.html templates/packages/flag.html templates/packages/flag_confirmed.html templates/packages/flagged.html templates/packages/search.html templates/public/download.html templates/todolists/view.html
Diffstat (limited to 'mirrors/admin.py')
-rw-r--r--mirrors/admin.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mirrors/admin.py b/mirrors/admin.py
index 0632872d..3786d8d2 100644
--- a/mirrors/admin.py
+++ b/mirrors/admin.py
@@ -33,14 +33,15 @@ class MirrorUrlInlineAdmin(admin.TabularInline):
extra = 3
# ripped off from django.forms.fields, adding netmask ability
-ipv4nm_re = re.compile(r'^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}(/(\d|[1-2]\d|3[0-2])){0,1}$')
+IPV4NM_RE = re.compile(r'^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}(/(\d|[1-2]\d|3[0-2])){0,1}$')
+
class IPAddressNetmaskField(forms.fields.RegexField):
default_error_messages = {
'invalid': u'Enter a valid IPv4 address, possibly including netmask.',
}
def __init__(self, *args, **kwargs):
- super(IPAddressNetmaskField, self).__init__(ipv4nm_re, *args, **kwargs)
+ super(IPAddressNetmaskField, self).__init__(IPV4NM_RE, *args, **kwargs)
class MirrorRsyncForm(forms.ModelForm):
class Meta: