Plain is headed towards 1.0! Subscribe for development updates →

Forms

Handle user input.

  • forms don't render themselves
  • registered scripts vs media?
  • move model save logic into form.save() - disconnect them
  • Form: validates input from request, saves it
  • Form field: validates field, knows how to parse from html data ?
  • starter includes form components - no markup in python

Re-using input styles

plain-elements, or includes

 1from plain.exceptions import ValidationError
 2
 3
 4class FormFieldMissingError(Exception):
 5    pass
 6
 7
 8__all__ = [
 9    "ValidationError",
10    "FormFieldMissingError",
11]