Package django :: Package newforms :: Module fields :: Class Field
[hide private]
[frames] | no frames]

Class Field

source code

object --+
         |
        Field

Instance Methods [hide private]
 
__init__(self, required=True, widget=None, label=None, initial=None, help_text=None, error_messages=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
clean(self, value)
Validates the given value and returns its "cleaned" value as an appropriate Python object.
source code
 
widget_attrs(self, widget)
Given a Widget instance (*not* a Widget class), returns a dictionary of any HTML attributes that should be added to the Widget, based on this Field.
source code
 
__deepcopy__(self, memo) source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  widget = TextInput
  hidden_widget = HiddenInput
  default_error_messages = {'required': _(u'This field is requir...
  creation_counter = 0
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, required=True, widget=None, label=None, initial=None, help_text=None, error_messages=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

clean(self, value)

source code 

Validates the given value and returns its "cleaned" value as an appropriate Python object.

Raises ValidationError for any errors.


Class Variable Details [hide private]

default_error_messages

Value:
{'required': _(u'This field is required.'), 'invalid': _(u'Enter a val\
id value.'),}