Browse files

Fixed #4987 -- Added documentation for newforms.DecimalField. Based o…

…n a patch from

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 1777e74 commit 20e3ae5222405d0ec72704a38e80235f725728ee @malcolmt malcolmt committed Aug 11, 2007
Showing with 22 additions and 0 deletions.
  1. +1 −0 AUTHORS
  2. +21 −0 docs/newforms.txt
@@ -141,6 +141,7 @@ answer newbie questions, and generally made Django that much better:
Hyun Mi Ae
Tom Insam
Baurzhan Ismagulov <>
Zak Johnson <>
Michael Josephson <>
@@ -1129,6 +1129,24 @@ If no ``input_formats`` argument is provided, the default input formats are::
'%m/%d/%y %H:%M', # '10/25/06 14:30'
'%m/%d/%y', # '10/25/06'
+**New in Django development version**
+ * Default widget: ``TextInput``
+ * Empty value: ``None``
+ * Normalizes to: A Python ``decimal``.
+ * Validates that the given value is a decimal. Leading and trailing
+ whitespace is ignored.
+Takes four optional arguments: ``max_value``, ``min_value``, ``max_digits``,
+and ``decimal_places``. The first two define the limits for the fields value.
+``max_digits`` is the maximum number of digits (those before the decimal
+point plus those after the decimal point, with leading zeros stripped)
+permitted in the value, whilst ``decimal_places`` is the maximum number of
+decimal places permitted.
@@ -1199,6 +1217,9 @@ When you use a ``FileField`` on a form, you must also remember to
* Validates that the given value is an integer. Leading and trailing
whitespace is allowed, as in Python's ``int()`` function.
+Takes two optional arguments for validation, ``max_value`` and ``min_value``.
+These control the range of values permitted in the field.

0 comments on commit 20e3ae5

Please sign in to comment.