Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 1.34 KB

django_forms.org

File metadata and controls

13 lines (11 loc) · 1.34 KB

Django forms

RequestRequirementsImplementation
GET <object_id>Return HTML with widgets containing db valuesform = Form(initial=get_values_from_db(object_id)
form.is_bound = False
initial values rendered in HTML as ?
do all widgets support initial? dropdowns?
POST dataValidateform = Form(data=post_data)
If valid: write to dbform.is_valid(), form.errors
If invalid: return HTML with* POST data and validation errorsform.is_bound = True