Index: docs/releases/1.4.txt
===================================================================
--- docs/releases/1.4.txt	(revision 17167)
+++ docs/releases/1.4.txt	(working copy)
@@ -341,8 +341,17 @@
 a :class:`~django.db.models.fields.GenericIPAddressField` model field,
 a :class:`~django.forms.fields.GenericIPAddressField` form field and
 the validators :data:`~django.core.validators.validate_ipv46_address` and
-:data:`~django.core.validators.validate_ipv6_address`
+:data:`~django.core.validators.validate_ipv6_address`.
 
+The :class:`~django.contrib.comments.models.Comment` model formerly used a
+:class:`~django.db.models.fields.IPAddressField` to store the ip_address of
+comment submitters. This has been updated to use the new IPv4 and IPv6 capable
+``GenericIPAddressField``. Unfortunately, the old type would silently truncate
+IPv6 addresses longer than 15 characters for users of databases not having a
+native IP address type (this does not apply to PostgreSQL). It is recommended
+that users of the comments application resize the
+``django_comments.ip_address`` column in affected databases to 39 characters.
+
 Updated default project layout and ``manage.py``
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Index: tests/modeltests/validation/models.py
===================================================================
--- tests/modeltests/validation/models.py	(revision 17167)
+++ tests/modeltests/validation/models.py	(working copy)
@@ -88,6 +88,8 @@
     generic_ip = models.GenericIPAddressField(blank=True, null=True, unique=True)
     v4_ip = models.GenericIPAddressField(blank=True, null=True, protocol="ipv4")
     v6_ip = models.GenericIPAddressField(blank=True, null=True, protocol="ipv6")
+    ip_verbose_name = models.GenericIPAddressField("IP Address Verbose",
+			blank=True, null=True)
 
 class GenericIPAddrUnpackUniqueTest(models.Model):
     generic_v4unpack_ip = models.GenericIPAddressField(blank=True, unique=True, unpack_ipv4=True)
@@ -102,4 +104,4 @@
         auto2 = models.AutoField(primary_key=True)
 except AssertionError, assertion_error:
     pass # Fail silently
-assert str(assertion_error) == u"A model can't have more than one AutoField."
\ No newline at end of file
+assert str(assertion_error) == u"A model can't have more than one AutoField."
Index: django/db/models/fields/__init__.py
===================================================================
--- django/db/models/fields/__init__.py	(revision 17167)
+++ django/db/models/fields/__init__.py	(working copy)
@@ -1010,13 +1010,14 @@
     description = _("IP address")
     default_error_messages = {}
 
-    def __init__(self, protocol='both', unpack_ipv4=False, *args, **kwargs):
+    def __init__(self, verbose_name=None, name=None, protocol='both',
+                 unpack_ipv4=False, **kwargs):
         self.unpack_ipv4 = unpack_ipv4
         self.default_validators, invalid_error_message = \
             validators.ip_address_validators(protocol, unpack_ipv4)
         self.default_error_messages['invalid'] = invalid_error_message
         kwargs['max_length'] = 39
-        Field.__init__(self, *args, **kwargs)
+        Field.__init__(self, verbose_name, name, **kwargs)
 
     def get_internal_type(self):
         return "GenericIPAddressField"
Index: django/contrib/comments/models.py
===================================================================
--- django/contrib/comments/models.py	(revision 17167)
+++ django/contrib/comments/models.py	(working copy)
@@ -57,7 +57,8 @@
 
     # Metadata about the comment
     submit_date = models.DateTimeField(_('date/time submitted'), default=None)
-    ip_address  = models.IPAddressField(_('IP address'), blank=True, null=True)
+    ip_address  = models.GenericIPAddressField(_('IP address'),
+                    unpack_ipv4=True, blank=True, null=True)
     is_public   = models.BooleanField(_('is public'), default=True,
                     help_text=_('Uncheck this box to make the comment effectively ' \
                                 'disappear from the site.'))
Index: tests/modeltests/validation/models.py
===================================================================
--- tests/modeltests/validation/models.py	(revision 17167)
+++ tests/modeltests/validation/models.py	(working copy)
@@ -88,6 +88,8 @@
     generic_ip = models.GenericIPAddressField(blank=True, null=True, unique=True)
     v4_ip = models.GenericIPAddressField(blank=True, null=True, protocol="ipv4")
     v6_ip = models.GenericIPAddressField(blank=True, null=True, protocol="ipv6")
+    ip_verbose_name = models.GenericIPAddressField("IP Address Verbose",
+			blank=True, null=True)
 
 class GenericIPAddrUnpackUniqueTest(models.Model):
     generic_v4unpack_ip = models.GenericIPAddressField(blank=True, unique=True, unpack_ipv4=True)
@@ -102,4 +104,4 @@
         auto2 = models.AutoField(primary_key=True)
 except AssertionError, assertion_error:
     pass # Fail silently
-assert str(assertion_error) == u"A model can't have more than one AutoField."
\ No newline at end of file
+assert str(assertion_error) == u"A model can't have more than one AutoField."
Index: tests/regressiontests/comment_tests/tests/comment_view_tests.py
===================================================================
--- tests/regressiontests/comment_tests/tests/comment_view_tests.py	(revision 17167)
+++ tests/regressiontests/comment_tests/tests/comment_view_tests.py	(working copy)
@@ -101,15 +101,39 @@
         settings.DEBUG = olddebug
 
     def testCreateValidComment(self):
+        address = "1.2.3.4"
         a = Article.objects.get(pk=1)
         data = self.getValidData(a)
-        self.response = self.client.post("/post/", data, REMOTE_ADDR="1.2.3.4")
+        self.response = self.client.post("/post/", data, REMOTE_ADDR=address)
         self.assertEqual(self.response.status_code, 302)
         self.assertEqual(Comment.objects.count(), 1)
         c = Comment.objects.all()[0]
-        self.assertEqual(c.ip_address, "1.2.3.4")
+        self.assertEqual(c.ip_address, address)
         self.assertEqual(c.comment, "This is my comment")
 
+    def testCreateValidCommentIPv6(self):
+        address = "2a02::223:6cff:fe8a:2e8a"
+        a = Article.objects.get(pk=1)
+        data = self.getValidData(a)
+        self.response = self.client.post("/post/", data, REMOTE_ADDR=address)
+        self.assertEqual(self.response.status_code, 302)
+        self.assertEqual(Comment.objects.count(), 1)
+        c = Comment.objects.all()[0]
+        self.assertEqual(c.ip_address, address)
+        self.assertEqual(c.comment, "This is my comment")
+
+    def testCreateValidCommentIPv6Unpack(self):
+        address = "::ffff:18.52.18.52"
+        a = Article.objects.get(pk=1)
+        data = self.getValidData(a)
+        self.response = self.client.post("/post/", data, REMOTE_ADDR=address)
+        self.assertEqual(self.response.status_code, 302)
+        self.assertEqual(Comment.objects.count(), 1)
+        c = Comment.objects.all()[0]
+        # We trim the '::ffff:' bit off because it is an IPv4 addr
+        self.assertEqual(c.ip_address, address[7:])
+        self.assertEqual(c.comment, "This is my comment")
+
     def testPostAsAuthenticatedUser(self):
         a = Article.objects.get(pk=1)
         data = self.getValidData(a)
Index: tests/regressiontests/model_fields/tests.py
===================================================================
--- tests/regressiontests/model_fields/tests.py	(revision 17167)
+++ tests/regressiontests/model_fields/tests.py	(working copy)
@@ -11,7 +11,7 @@
 from django.utils import unittest
 
 from .models import (Foo, Bar, Whiz, BigD, BigS, Image, BigInt, Post,
-    NullBooleanModel, BooleanModel, Document, RenamedField)
+    NullBooleanModel, BooleanModel, Document, RenamedField, VerboseNameField)
 
 # If PIL available, do these tests.
 if Image:
@@ -65,6 +65,12 @@
         self.assertTrue(hasattr(instance, 'get_fieldname_display'))
         self.assertFalse(hasattr(instance, 'get_modelname_display'))
 
+    def test_field_verbose_name(self):
+        m = VerboseNameField
+        for i in range(1, 9):
+            self.assertEqual(m._meta.get_field('field%d' % i).verbose_name,
+                    'verbose field%d' % i)
+
 class DecimalFieldTests(test.TestCase):
     def test_to_python(self):
         f = models.DecimalField(max_digits=4, decimal_places=2)
Index: tests/regressiontests/model_fields/models.py
===================================================================
--- tests/regressiontests/model_fields/models.py	(revision 17167)
+++ tests/regressiontests/model_fields/models.py	(working copy)
@@ -69,6 +69,16 @@
 class RenamedField(models.Model):
     modelname = models.IntegerField(name="fieldname", choices=((1,'One'),))
 
+class VerboseNameField(models.Model):
+    field1 = models.BooleanField("verbose field1")
+    field2 = models.DateField("verbose field2")
+    field3 = models.DateTimeField("verbose field3")
+    field4 = models.TimeField("verbose field4")
+    field5 = models.DecimalField("verbose field5", max_digits=6, decimal_places=1)
+    field6 = models.FilePathField("verbose field6")
+    field7 = models.GenericIPAddressField("verbose field7", protocol="ipv4")
+    field8 = models.URLField("verbose field8")
+
 # This model isn't used in any test, just here to ensure it validates successfully.
 # See ticket #16570.
 class DecimalLessThanOne(models.Model):
