In the directory you created, create a simple flask app with the following features: Main page should have an HTML form that allows the user to enter the name of a TV show (no need to check if it’s a real TV show). This TV show should be saved in a list of favorites. If it’s already in the list, nothing should happen. Main page should have a second HTML form that allows the user to enter the name of a TV show. This TV show should be deleted from the list of favorites. If it’s not in the list, nothing should happen. Main page should display the statement “You have X saved TV shows”, where X is the number of TV shows the user has saved, as well as a list of the saved shows. The number should increment when a new show is entered, and decrement when a show is deleted (this requires a page refresh)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
  1. In the directory you created, create a simple flask app with the following features:
    1. Main page should have an HTML form that allows the user to enter the name of a TV show (no need to check if it’s a real TV show). This TV show should be saved in a list of favorites. If it’s already in the list, nothing should happen.
    2. Main page should have a second HTML form that allows the user to enter the name of a TV show. This TV show should be deleted from the list of favorites. If it’s not in the list, nothing should happen.
    3. Main page should display the statement “You have X saved TV shows”, where X is the number of TV shows the user has saved, as well as a list of the saved shows. The number should increment when a new show is entered, and decrement when a show is deleted (this requires a page refresh)
  2. Create a .env file with your database URL and save it there. Your database URL shouldn’t be written anywhere in your actual Python code. As always, your .gitignore should make sure your .env file isn’t pushed to GitHub.
  3. Turn in a GitHub repo containing the Flask app from above on Gradescope.
Expert Solution
Step 1

Flask is a small and lightweight Python web framework that provides useful tools and features that make creating web applications in Python easier. It gives developers flexibility and is a more accessible framework for new developers since you can build a web application quickly using only a single Python file. Flask is also extensible and doesn’t force a particular directory structure or require complicated boilerplate code before getting started.

As part of this tutorial, you’ll use the Bootstrap toolkit to style your application so it is more visually appealing. Bootstrap will help you incorporate responsive web pages in your web application so that it also works well on mobile browsers without writing your own HTML, CSS, and JavaScript code to achieve these goals. The toolkit will allow you to focus on learning how Flask works.

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY