Save this video — free

CS50 Fall 2025 - Lecture 9 - Flask (live, unedited)

CS50 · 3:01:15 · Watch on YouTube

CS50 Fall 2025 - Lecture 9 - Flask (live, unedited) Watch on YouTube →

Overview

CS50's Lecture 9 introduces web programming with Python's Flask microframework, synthesizing past concepts to build dynamic web applications. The lecture covers routing, HTML templating with Jinja, handling user input via GET and POST requests, session management with cookies, database integration using SQLite, and building APIs that return JSON data, culminating in a Frosh IMs registration system and a simple bookstore.

Key takeaways

Chapters

17:51 Introduction to Web Programming with Flask
19:18 Understanding URLs, Routes, and HTTP Requests
21:14 Creating a Basic Flask Application: Hello World
24:34 Rendering HTML Templates with Flask
29:10 Handling User Input with Request Arguments
34:30 Implementing Conditional Logic in Templates
41:00 Structuring Applications with Multiple Routes and Forms
44:05 Accessing POST Data with `request.form`
52:15 Combining GET and POST Logic in a Single Route
56:55 Refactoring Templates with Layouts and Blocks
1:01:55 Handling Dynamic Form Data with Checkboxes
1:07:20 Implementing Radio Buttons and User Input Validation
1:12:15 Improving User Experience with Error Messages and Images
1:17:40 Storing Data Persistently with SQLite Databases
1:21:55 Managing Database Records: Creating, Reading, and Deleting
1:25:35 Implementing User Authentication with Sessions and Cookies
1:30:15 Building a Login System with Flask-Session
1:34:20 Creating a Shopping Cart with Sessions
1:38:35 Displaying Dynamic Data in HTML Tables
1:42:15 Implementing Redirects for Better User Flow
1:46:55 Database Design: Normalization and Relationships
1:50:15 Implementing Deletion Functionality with Hidden Inputs
1:53:35 Securing Actions: POST vs. GET Requests
1:56:40 Consolidating Routes and Handling Multiple Selections
2:00:03 Leveraging Global Variables and Jinja Loops for Dynamic Content
2:03:35 Building APIs with JSON Responses
2:06:55 Implementing Autocomplete Search with JavaScript and APIs
2:08:35 MVC Paradigm: Model, View, Controller
2:11:55 Understanding HTTP Cookies and Sessions
2:13:20 Implementing Login/Logout Functionality
2:15:40 Building a Bookstore with a Shopping Cart
2:20:15 Advanced Search with SQL LIKE and Wildcards
2:23:20 Returning Raw HTML Snippets for Interactive Frontends
2:25:15 Serving JSON Data for APIs
2:26:40 Final Project Building Blocks and Next Steps

Keep these chapters and the full searchable transcript in your own library.

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, CS50.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.