Django

Code

Changeset 5855

Show
Ignore:
Timestamp:
08/11/07 07:10:23 (1 year ago)
Author:
mtredinnick
Message:

Fixed #4987 -- Added documentation for newforms.DecimalField?. Based on a patch from james_027@yahoo.com.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/AUTHORS

    r5849 r5855  
    142142    Tom Insam 
    143143    Baurzhan Ismagulov <ibr@radix50.net> 
     144    james_027@yahoo.com 
    144145    jcrasta@gmail.com 
    145146    Zak Johnson <zakj@nox.cx> 
  • django/trunk/docs/newforms.txt

    r5851 r5855  
    11301130    '%m/%d/%y',              # '10/25/06' 
    11311131 
     1132``DecimalField`` 
     1133~~~~~~~~~~~~~~~~ 
     1134 
     1135**New in Django development version** 
     1136 
     1137    * Default widget: ``TextInput`` 
     1138    * Empty value: ``None`` 
     1139    * Normalizes to: A Python ``decimal``. 
     1140    * Validates that the given value is a decimal. Leading and trailing 
     1141      whitespace is ignored. 
     1142 
     1143Takes four optional arguments: ``max_value``, ``min_value``, ``max_digits``, 
     1144and ``decimal_places``. The first two define the limits for the fields value. 
     1145``max_digits`` is the maximum number of digits (those before the decimal 
     1146point plus those after the decimal point, with leading zeros stripped) 
     1147permitted in the value, whilst ``decimal_places`` is the maximum number of 
     1148decimal places permitted. 
     1149 
    11321150``EmailField`` 
    11331151~~~~~~~~~~~~~~ 
     
    11991217    * Validates that the given value is an integer. Leading and trailing 
    12001218      whitespace is allowed, as in Python's ``int()`` function. 
     1219 
     1220Takes two optional arguments for validation, ``max_value`` and ``min_value``. 
     1221These control the range of values permitted in the field. 
    12011222 
    12021223``MultipleChoiceField``