From the course: Full Stack Web Development with Flask

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

Adding the aggregation pipeline to application

Adding the aggregation pipeline to application - Flask Tutorial

From the course: Full Stack Web Development with Flask

Adding the aggregation pipeline to application

- [Instructor] Adding the aggregation pipeline to the application. In this video, we're going to be updating the enrollment route to interact with the database, and then we're going to integrate the aggregation pipeline into the application. The aggregation pipeline has three stages: lookup, match, and unwind. And so we're going to take this directly from MongoDB and insert it into our application using the aggregate function. So let's go and see how this is done. And then what else do we need? We got that one there. We got the classes, going to map to the classes up there. I think that is good to go, maybe. We only, there's only one way to find out, right? One way to find out. So let's run this. Save that and go into the browser, and click on Enrollment. So Student 1, it doesn't enroll any course. Is it Student one or two? I don't remember. Let's go check it out. Okay, so we have user ID is one. If there's…

Contents