#8556: models.CommaSeperatedIntegerField doesn't return a forms field of any use
-------------------------------+--------------------------------------------
          Reporter:  Alex      |         Owner:  nobody
            Status:  new       |     Milestone:  1.0   
         Component:  Forms     |       Version:  SVN   
        Resolution:            |      Keywords:        
             Stage:  Accepted  |     Has_patch:  1     
        Needs_docs:  0         |   Needs_tests:  1     
Needs_better_patch:  0         |  
-------------------------------+--------------------------------------------
Comment (by kratorius):

 The regexp used in the patch is not completely right, it matches too many
 things:
 {{{
 #!python
 >>> x = re.compile("^[\d,]+$")
 >>>
 >>> type(x.match("1,2,3"))
 <type '_sre.SRE_Match'>
 >>> type(x.match(",1,2,3"))
 <type '_sre.SRE_Match'>
 >>> type(x.match("1,2,3,"))
 <type '_sre.SRE_Match'>
 >>> type(x.match("1,,,,2,,,,,3,,,"))
 <type '_sre.SRE_Match'>
 >>> type(x.match("1.2"))
 <type 'NoneType'>
 >>> type(x.match(",,,,,"))
 <type '_sre.SRE_Match'>
 }}}

 I guess the problem is in {{{"[\d,]"}}} since the square brackets don't
 care about the order of the specified chars. Or maybe django should allow
 that strings?

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8556#comment:4>
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