class documentation
class CharField(Field): (source)
Known subclasses: django.contrib.auth.forms.UsernameField
, django.contrib.postgres.forms.array.SimpleArrayField
, django.contrib.postgres.forms.hstore.HStoreField
, django.forms.fields.EmailField
, django.forms.fields.GenericIPAddressField
, django.forms.fields.JSONField
, django.forms.fields.RegexField
, django.forms.fields.SlugField
, django.forms.fields.URLField
, django.forms.fields.UUIDField
Undocumented
Method | __init__ |
Undocumented |
Method | to |
Return a string. |
Method | widget |
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. |
Instance Variable | empty |
Undocumented |
Instance Variable | max |
Undocumented |
Instance Variable | min |
Undocumented |
Instance Variable | strip |
Undocumented |
Inherited from Field
:
Method | __deepcopy__ |
Undocumented |
Method | bound |
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 |
Return a BoundField instance that will be used when accessing the form field in a template. |
Method | has |
Return True if data differs from initial. |
Method | prepare |
Undocumented |
Method | run |
Undocumented |
Method | validate |
Undocumented |
Class Variable | default |
Undocumented |
Class Variable | default |
Undocumented |
Class Variable | empty |
Undocumented |
Instance Variable | disabled |
Undocumented |
Instance Variable | error |
Undocumented |
Instance Variable | help |
Undocumented |
Instance Variable | initial |
Undocumented |
Instance Variable | label |
Undocumented |
Instance Variable | label |
Undocumented |
Instance Variable | localize |
Undocumented |
Instance Variable | required |
Undocumented |
Instance Variable | show |
Undocumented |
Instance Variable | validators |
Undocumented |
Instance Variable | widget |
Undocumented |
def __init__(self, *, max_length=None, min_length=None, strip=True, empty_value='', **kwargs):
(source)
¶
overrides
django.forms.fields.Field.__init__
overridden in
django.contrib.postgres.forms.array.SimpleArrayField
, django.forms.fields.EmailField
, django.forms.fields.GenericIPAddressField
, django.forms.fields.JSONField
, django.forms.fields.RegexField
, django.forms.fields.SlugField
, django.forms.fields.URLField
Undocumented
overrides
django.forms.fields.Field.to_python
overridden in
django.contrib.auth.forms.UsernameField
, django.contrib.postgres.forms.array.SimpleArrayField
, django.contrib.postgres.forms.hstore.HStoreField
, django.forms.fields.GenericIPAddressField
, django.forms.fields.JSONField
, django.forms.fields.URLField
, django.forms.fields.UUIDField
Return a string.
overrides
django.forms.fields.Field.widget_attrs
overridden in
django.contrib.auth.forms.UsernameField
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.