#7609: PositiveIntegerField and co have a misleading name
-------------------------------------+-------------------------------------
               Reporter:  Gergely    |        Owner:  nobody
  Kontra                             |    Milestone:
  <pihentagy+djangoproject@…>        |      Version:  SVN
                 Status:  new        |     Keywords:  name convention,
              Component:  Forms      |  rename
             Resolution:             |    Has patch:  0
           Triage Stage:  Design     |  Needs tests:  0
  decision needed                    |
    Needs documentation:  0          |
Patch needs improvement:  0          |
-------------------------------------+-------------------------------------

Comment (by jonlesser@…):

 I was surprised to get a ZeroDivisionError error when using this field
 with a ModelForm, because as people have already pointed out, 0 is not a
 positive integer. So how could that be valid input for the
 PositiveIntegerField?

 Now I'm just specifying a different form field in my ModelForm:
 forms.IntegerField(min_value=1).

 IMO changing the min_value form field default for this field from 0 to 1
 is better than making a new UnsignedIntegerField class. At the very least,
 a caution note in the docs for PositiveIntegerField.

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