Class 6 Prep Review

Here are some review questions for you to solidify your knowledge of the concepts covered in this class:

  1. What are the benefits of using templates instead of str.format for HTML?

  2. How do you use placeholders in templates? Is it the same as with str.format? If not, how is it different?

  3. How do you do HTML escaping with templates?

  4. What is the syntax you use to include a loop in your template? And to include a conditional?

  5. How can you make your code more reusable and write less boilerplate code using templates? Explain the relationship between base templates, content blocks and template extensions.