22. Refill the FlaskΒΆ

  1. 22.1. HTML Escaping
    1. 22.1.1. Escaping Text Entries
    2. 22.1.2. Always Escape
  2. 22.2. Jinja3 Templates
    1. 22.2.1. More Reasons for Using Templates
  3. 22.3. Chapter Practice
    1. 22.3.1. Pro Tip!
  4. 22.4. Adding Logic to Templates
    1. 22.4.1. Loops in Templates
      1. 22.4.1.1. Using Index Values
      2. 22.4.1.2. Placement Matters
    2. 22.4.2. Try It!
      1. 22.4.2.1. Bonus Try It!
    3. 22.4.3. Check Your Understanding
  5. 22.5. Conditionals in Templates
    1. 22.5.1. if/elif/else Syntax
    2. 22.5.2. Try It!
      1. 22.5.2.1. Add the Conditional
    3. 22.5.3. Check Your Understanding
  6. 22.6. Reusing Content
    1. 22.6.1. A base Template
      1. 22.6.1.1. Block Out Space for Other HTML Code
    2. 22.6.2. Extending From the Base
    3. 22.6.3. Add A Common Header
      1. 22.6.3.1. Finishing Touches
    4. 22.6.4. Extend base to a Second Page
    5. 22.6.5. Multiple Blocks
    6. 22.6.6. Video Summary
    7. 22.6.7. Check Your Understanding
  7. 22.7. Page Navigation
    1. 22.7.1. A List of Links
    2. 22.7.2. Bring in Some Logic
      1. 22.7.2.1. Update main.py
      2. 22.7.2.2. Update base.html
    3. 22.7.3. A Dropdown Menu
      1. 22.7.3.1. CSS Breakdown
    4. 22.7.4. Navigation Bar and Other Options
  8. 22.8. Redirecting
    1. 22.8.1. Render Template vs. Redirect
    2. 22.8.2. Redirect with Flask
    3. 22.8.3. Difference Summary
    4. 22.8.4. Redirect Methods
      1. 22.8.4.1. Response Codes
      2. 22.8.4.2. Technical Details (Optional)
    5. 22.8.5. Check Your Understanding
  9. 22.9. The User Experience
    1. 22.9.1. Explore UX
    2. 22.9.2. Other Reading
    3. 22.9.3. Check Your Understanding
  10. 22.10. Exercises: Logic In Templates
    1. 22.10.1. Setup
    2. 22.10.2. Part A: Extend from base.html
    3. 22.10.3. Part B: Add a Loop
      1. 22.10.3.1. The choices Dictionary
      2. 22.10.3.2. Update grid.html
    4. 22.10.4. Part C: Add a Conditional
  11. 22.11. Project: Improve the User Experience
    1. 22.11.1. Setup
      1. 22.11.1.1. Run the Application
    2. 22.11.2. Part A: Clean Up the View
    3. 22.11.3. Part B: Keep Valid Entries
      1. 22.11.3.1. Update register.html
      2. 22.11.3.2. Update main.py
    4. 22.11.4. Part C: Display Error Messages
    5. 22.11.5. Part D: Redirect on Success
    6. 22.11.6. Bonus Mission