Collecting and Displaying Data from the Database
In the previous chapters, movie information was gathered using dummy data implemented within a Python list. While this approach served as a good initial attempt to display movie information, it doesn’t scale well. If we want to add a new movie or edit an existing one, we will need to modify our Python code. This chapter focuses on the process of refactoring both the movies and individual movie pages to retrieve and present information directly from the database. With this approach, if we need to add new movies or modify existing ones, we can simply access the admin panel without the need to modify the Python code. Additionally, we will implement a new movie search functionality.
In this chapter, we will cover the following topics:
- Removing the movies’ dummy data
- Updating the movie listings page
- Updating the listing of an individual movie page
- Implementing a search movie functionality
By the...