Workshop
The workshop consists of a set of questions and answers designed to solidify your understanding of the material covered in this hour. Try answering the questions before looking at the answers.
Quiz
1. | What are two ways you can determine if the data in a Form object is valid? |
2. | How can the data from an HTML form be retrieved from a POST request? |
3. | How do you save the data in a Form object to the database? |
Quiz Answers
1. | Call the is_valid() function of the object. Access the errors attribute of the object. |
2. | From the POST attribute of the HttpRequest object that is passed into the view function. |
3. | Use the save() function of the Form object. |