表单表单Detailed form API reference. For introductory material, see the使用表单 topic guide. The Forms API Bound and unbound formsUsing forms to validate dataDynamic initial valuesChecking which form data has changedAccessing the fields from the formAccessing "clean" dataOutputting forms as HTMLMore granular outputCustomizing BoundFieldBinding uploaded files to a formSubclassing formsPrefixes for forms Form fields Core field argumentsChecking if the field data has changedBuilt-in Field classesSlightly complex built-in Field classesFields which handle relationshipsCreating custom fields Model Form Functions modelform_factorymodelformset_factoryinlineformset_factory Formset Functions formset_factory The form rendering API The low-level render APIBuilt-in-template form renderersContext available in widget templatesOverriding built-in widget templates 小部件 Specifying widgetsSetting arguments for widgetsWidgets inheriting from the Select widgetCustomizing widget instancesBase widget classesBuilt-in widgets Form and field validation Raising ValidationErrorUsing validation in practice