Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial And Temporal Databases 11th International Symposium Sstd 2009 Aalborg Denmark July 8 10 2009 Proceedings Lncs 5644

Authors: Nikos Mamoulis ,Thomas Seidl ,Kristian Torp ,Ira Assent

2009th Edition

3642029817, 978-3642029813

More Books

Students also viewed these Databases questions