#1636: [patch] Add support for CIDR datatype
----------------------------------------------+-----------------------------
Reporter: Rob Shakir ([EMAIL PROTECTED]) | Owner: adrian Status: new | Component: Database wrapper Version: | Resolution: Keywords: | Stage: Design decision needed Has_patch: 1 | Needs_docs: 0 Needs_tests: 0 | Needs_better_patch: 1 ----------------------------------------------+-----------------------------
Changes (by Marc Fargas <[EMAIL PROTECTED]>):

 * needs_better_patch:  0 => 1
 * stage:  Unreviewed => Design decision needed

Comment:

Maybe it could go better if it was an IPAddressField with and option
"accept_cidr=True|False" if so then treat the IPAddress as a CIDR mas:
ie:
{{{
   nocidr = IPAddressField()
   cidr = IPAddressField(accept_cidr=True)

   nocidr = '192.168.0.1'
   cidr = '192.168.0.1/24'
}}}

That way there's no need to add a new field to django, and having the
accept_cidr option defaulting to False would make the change totally
backwards compatible hence raising the possibilities of getting the patch
applied.

The only thing that would change is that with the option set to True the
database column would be different (to allocate the preffix) but being
False it would be the same as now.

What do you think?

--
Ticket URL: <http://code.djangoproject.com/ticket/1636#comment:3>
Django Code <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