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 happens if you modify an object's primary key and then use the object's function? |
2. | If you use the filter() function to create a QuerySet, when is the database actually accessed? |
3. | Which lookup type would you use if you needed to search for userID numbers between 1 and 10? |
Quiz Answers
1. | If another object exists with that primary key, it is overwritten by the new object. Otherwise, a new object is created. |
2. | When the filter object is evaluated in some way. |
3. | A range lookup. |