#811: [patch] IPv6 address field support
---------------------------------------------+------------------------------
          Reporter:  [email protected]  |         Owner:  adrian
            Status:  reopened                |     Milestone:        
         Component:  Core framework          |       Version:  SVN   
        Resolution:                          |      Keywords:        
             Stage:  Accepted                |     Has_patch:  1     
        Needs_docs:  0                       |   Needs_tests:  0     
Needs_better_patch:  1                       |  
---------------------------------------------+------------------------------
Changes (by lrekucki):

  * needs_better_patch:  0 => 1

Comment:

 I think this still needs some polish:

  1. There's a typo in django/core/validators:
 {{{
 validate_ipv6_address = IPv6Validator(_(u'Enter a valid IPv4 address.'),
 'invalid')
 }}}
  It probably should read: "Enter a valid IPv4/IPv6 address.". OTOH, the
 message in the form field is "Enter a valid IP address.". This needs to be
 consistent.

  2. ipv6_normalize() doesn't really fit in django.utils.http; There are
 utils modules with less code, so creating a one for IP won't hurt.
  3. The name is really confusing. Also, you can't create a field that only
 accepts IPv6 addresses. Maybe instead of a seperate field, a flag could be
 added to the existing IPAddressField:
 {{{
   IPAddressField() # accepts only IPv4, 15 chars in DB (the commons case
 now, backward compatible)
   IPAddressField(allow6=True) # accepts both IPv4 and IPv6, 39 chars
   IPAddressField(allow6=True, allow4=False) # accepts only IPv6, 39 chars
 (the future)
 }}}
  When everyone switches to IP6, we can then change the default flag
 values.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/811#comment:35>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to