Version 1 (modified by anonymous, 19 years ago) ( diff )

--

FormField

Manipulators create a "field" attribute that is used to describe the entries in an html form. Each field class takes a list of arguments in its initializer.

The first argument to all field initializers is the field_name. This is the name that is attached to the field's input.

Generic Widgets

  • TextField
    • field_name, length=30, maxlength=None, is_required=False, validator_list=[], member_name=None
    • <input type="text">
  • PasswordField
    • field_name, length=30, maxlength=None, is_required=False, validator_list=[], member_name=None
    • <input type="password">
  • LargeTextField
    • field_name, rows=10, cols=40, is_required=False, validator_list=[], maxlength=None
    • <textarea>
  • HiddenField
    • <input type="hidden">
  • CheckboxField
    • field_name, checked_by_default=False
    • <input type="checkbox">
  • SelectField
    • field_name, choices=[], size=1, is_required=False, validator_list=[], member_name=None
    • <select>
  • NullSelectField
    • This SelectField converts blank fields to None
    • field_name, choices=[], size=1, is_required=False, validator_list=[], member_name=None
    • <select><option></select>
  • RadioSelectField
    • Returns a special object, RadioFieldRenderer, that is iterable and has a default str() rendered output.
    • field_name, choices=[], ul_class="", is_required=False, validator_list=[], member_name=None
    • <ul><li><input type="radio"></li> ... </ul>
  • NullBooleanField
    • This SelectField provides "Yes", "No" and "Unknown", mapping results to True, False or None
    • field_name, is_required=False, validator_list=[]
    • <select>
  • CheckboxSelectMultipleField
    • This has an identical interface to SelectMultipleField, except the rendered widget is different.
    • field_name, choices=[], size=1, is_required=False, validator_list=[], member_name=None
    • <select><option></select>

File Uploads

  • FileUploadField
    • field_name, is_required=False, validator_list=[]
    • <input type="file">
  • ImageUploadField
    • A FileUploadField that raises CriticalValidationError if the uploaded file isn't an image.
    • field_name, is_required=False, validator_list=[]
    • <input type="file">

Numbers

  • IntegerField
    • field_name, length=10, maxlength=None, is_required=False, validator_list=[], member_name=None
    • <input type="text">
  • SmallIntegerField
    • field_name, length=5, maxlength=5, is_required=False, validator_list=[], member_name=None
    • <input type="text">
  • PositiveIntegerField
    • field_name, length=10, maxlength=None, is_required=False, validator_list=[], member_name=None
    • <input type="text">
  • PositiveSmallIntegerField
    • field_name, length=5, maxlength=5, is_required=False, validator_list=[], member_name=None
    • <input type="text">
  • FloatField
    • field_name, max_digits, decimal_places, is_required=False, validator_list=[]
    • <input type="text">

Dates and Times

  • DatetimeField
    • A FormField that automatically converts its data to a datetime.datetime object. The data should be in the format YYYY-MM-DD HH:MM:SS.
    • field_name, length=30, maxlength=None, is_required=False, validator_list=[]
    • <input type="text">
  • DateField
    • A FormField that automatically converts its data to a datetime.date object. The data should be in the format YYYY-MM-DD.
    • <input type="text">
  • TimeField
    • A FormField that automatically converts its data to a datetime.time object. The data should be in the format HH:MM:SS or HH:MM:SS.mmmmmm.
    • field_name, is_required=False, validator_list=[]
    • <input type="text">

Internet

  • EmailField
  • URLField
  • IPAddressField

Miscellaneous

  • FilePathField
  • PhoneNumberField
  • USStateField
  • CommaSeparatedIntegerField
  • RawIdAdminField
  • XMLLargeTextField
Note: See TracWiki for help on using the wiki.
Back to Top