diff options
author | Dan McGee <dan@archlinux.org> | 2014-08-23 21:30:25 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2014-09-01 18:26:05 -0500 |
commit | 9d0db65025c229941d40e1d4f02f092c9d205723 (patch) | |
tree | 1d07b2a2360012ec64a2b22eee15ee5e5aee61b2 /mirrors | |
parent | 28d486870de2c68b53e544a7082c991983d0d763 (diff) |
Fix up some IP address field issues
Ensure we always coerce values to unicode in our __unicode__ method, and
remove some now unneeded verbosity and comments since the upstream bug
has been fixed.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'mirrors')
-rw-r--r-- | mirrors/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mirrors/models.py b/mirrors/models.py index e360801b..641a6b97 100644 --- a/mirrors/models.py +++ b/mirrors/models.py @@ -118,7 +118,7 @@ class MirrorRsync(models.Model): created = models.DateTimeField(editable=False) def __unicode__(self): - return self.ip + return unicode(self.ip) class Meta: verbose_name = 'mirror rsync IP' @@ -127,7 +127,7 @@ class MirrorRsync(models.Model): class CheckLocation(models.Model): hostname = models.CharField(max_length=255) - source_ip = models.GenericIPAddressField(verbose_name='source IP', + source_ip = models.GenericIPAddressField('source IP', unpack_ipv4=True, unique=True) country = CountryField() created = models.DateTimeField(editable=False) |