Answered step by step
Verified Expert Solution
Question
1 Approved Answer
At Ace College, students can check out up to 10 books at a time but must have at least 1 book checked out at any
At Ace College, students can check out up to 10 books at a time but must have at least 1 book checked out at any given time. Consider two tables structured as follows in the dismodels py file from app import db class Student(db.Model): id =db,Column[db.Integer, primary_key= True] LastName =db.Column(db.String(B4)) FirstName =db.Column(db.String(34)] email = db.Column(db.String(120), index = True, unique= True) class Book(db.Model); id = db.Column[db.Integer, primary_key= True] model =db. Column(db.String(64),index = True ) What is the candinaily of the Stodent-Book rebtionship? One-to-many One-to-one Many-to-mary Many-to-one QUESTION 15 Suppose that Juan is working on a web app using the current Python and Flask versions. However, he is concemed that new versions of Flask and Python that get released in the future may break his application. From below, what is the most preferred solution to his wornes? Create a virtual environment for the app and activate it when working on the app. Save a different version of the anp whenever new Flask version is released He should not be concerned because Python and Flask are backward-compatible, so newer wersions will not break his app. Don't upgratee to the newer versions of Flask and Python until he's done with the app QUESTION 16 If you don't want to create the flaskenv file, then what would you need to do to run your website server? Put the contents of flaskenv in _init_py Type set FLASK_APP = startpy in each command prompt session Put FLASK_APP = start.py in the terriplates folder Type FLASK_APP = start.py each time the server is run in the same command prompt session QUESTION 17 Below is a snippet of the code in a himl fic that you would like to use as a handler for a decorator in your routes. py function: cbody? \{\% for fruit in fruits %} ediv>ep> I love eating {{ fruit }}}b>c}div> s/bodyp However, this would throw an error. Why? There cannot be a for loop built into html code. If's missing a link to a CSS fiks. Q There is an need for cthovive uestion Completion 5tatus: QUESTION 18 Which of the following doas not have the same directory degth as the ofters? templates directory init PY forms py config.py QUESTION 19 Given a base template called "base.html", how can we inherit from this base template in another htmll file, "ncw.html"? Put {% extends "base.html" %} at the top of new.html Put
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started