File tree 3 files changed +2
-4
lines changed
3 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 1
- from IPy import IP
2
-
3
1
from django import forms
4
2
from django .core import validators
5
3
from django .core .exceptions import ValidationError
6
4
from django .db import models
7
5
6
+ from ipaddress import ip_address as IP
8
7
9
8
class IPNetworkFormField (forms .Field ):
10
9
def to_python (self , value ):
Original file line number Diff line number Diff line change @@ -27,4 +27,4 @@ def test_ipv4(self):
27
27
def test_invalid (self ):
28
28
with self .assertRaises (ValueError ) as e :
29
29
MirrorRsync .objects .create (ip = "8.8.8.8.8" , mirror = self .mirror )
30
- self .assertIn ('IPv4 Address with more than 4 bytes ' , str (e .exception ))
30
+ self .assertIn ('does not appear to be an IPv4 or IPv6 address ' , str (e .exception ))
Original file line number Diff line number Diff line change 1
1
-e git+git://github.com/fredj/cssmin.git@master#egg=cssmin
2
2
Django == 3.0.7
3
- IPy == 1.00
4
3
Markdown == 3.2.1
5
4
bencode.py == 2.0.0
6
5
django-countries == 5.5
You can’t perform that action at this time.
0 commit comments