class documentation

class DecimalField(IntegerField): (source)

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method to_python Validate that the input is a decimal number. Return a Decimal instance or None for empty values. Ensure that there are no more than max_digits in the number and no more than decimal_places digits after the decimal point.
Method validate Undocumented
Method widget_attrs Given a Widget instance (*not* a Widget class), return a dictionary of any HTML attributes that should be added to the Widget, based on this Field.
Class Variable default_error_messages Undocumented
Instance Variable decimal_places Undocumented
Instance Variable max_digits Undocumented

Inherited from IntegerField:

Class Variable re_decimal Undocumented
Instance Variable max_value Undocumented
Instance Variable min_value Undocumented
Instance Variable step_size Undocumented

Inherited from Field (via IntegerField):

Method __deepcopy__ Undocumented
Method bound_data Return the value that should be shown for this field on render of a bound form, given the submitted POST data for the field and the initial data, if any.
Method clean Validate the given value and return its "cleaned" value as an appropriate Python object. Raise ValidationError for any errors.
Method get_bound_field Return a BoundField instance that will be used when accessing the form field in a template.
Method has_changed Return True if data differs from initial.
Method prepare_value Undocumented
Method run_validators Undocumented
Class Variable default_validators Undocumented
Class Variable empty_values Undocumented
Instance Variable disabled Undocumented
Instance Variable error_messages Undocumented
Instance Variable help_text Undocumented
Instance Variable initial Undocumented
Instance Variable label Undocumented
Instance Variable label_suffix Undocumented
Instance Variable localize Undocumented
Instance Variable required Undocumented
Instance Variable show_hidden_initial Undocumented
Instance Variable validators Undocumented
Instance Variable widget Undocumented
def __init__(self, *, max_value=None, min_value=None, max_digits=None, decimal_places=None, **kwargs): (source)
def to_python(self, value): (source)

Validate that the input is a decimal number. Return a Decimal instance or None for empty values. Ensure that there are no more than max_digits in the number and no more than decimal_places digits after the decimal point.

def validate(self, value): (source)

Undocumented

def widget_attrs(self, widget): (source)

Given a Widget instance (*not* a Widget class), return a dictionary of any HTML attributes that should be added to the Widget, based on this Field.

decimal_places = (source)

Undocumented

max_digits = (source)

Undocumented