Detailed explanation of how to use the forms form class in Python's Django framework

WBOY
Release: 2016-07-21 14:53:17
Original
1124 people have browsed it

Form form functions

  • Automatically generate HTML form elements
  • Check the legality of form data
  • If validation error occurs, redisplay the form (data will not be reset)
  • Data type conversion (character type data is converted into the corresponding Python type)

Form related objects include

  • Widget: A tool used to render HTML elements, such as: forms.Textarea corresponds to the