FLASK quiz

studied byStudied by 0 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 12

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

13 Terms

1

What is Flask in Python?

Flask is a micro web framework for Python. it is lightweight and simple to use, with minimal requirements.

New cards
2

Which TERMINAL command is used to install Flask?

Pip

New cards
3

What is the default port Flask runs on when using app.run() without arguments?

Flask runs on port 5000 by default.

New cards
4

What file extension is typically used for Flask templates?

.html

New cards
5

In Flask, which method is used to render an HTML template?

jinja/rendertemplate()

New cards
6

What is the purpose of the @app.route() decorator in Flask?

It defines URLs telling flask what function should handle the request

New cards
7

What is the purpose of the name variable in a Flask application?

creates an instance of the flask class

New cards
8

What is Jinja2 in Flask?

allows us to insert Python variables into our templates.

New cards
9

How do you pass a variable to an HTML template in Flask?

modify app.py to return render template

New cards
10

What is the correct way to start a basic Flask app?

Use python app.py to define the app

New cards
11

What is the purpose of Flask(__name__)

creates the flask instance

New cards
12

How can you enable debug mode in Flask?

flask run CLI commandto start the development server.

New cards
13

Which of the following best describes a Flask route?

the designated paths or endpoints in a web application that correspond to specific functions

New cards
robot