FLASK quiz

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/12

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

13 Terms

1
New cards

What is Flask in Python?

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

2
New cards

Which TERMINAL command is used to install Flask?

Pip

3
New cards

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

Flask runs on port 5000 by default.

4
New cards

What file extension is typically used for Flask templates?

.html

5
New cards

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

jinja/rendertemplate()

6
New cards

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

It defines URLs telling flask what function should handle the request

7
New cards

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

creates an instance of the flask class

8
New cards

What is Jinja2 in Flask?

allows us to insert Python variables into our templates.

9
New cards

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

modify app.py to return render template

10
New cards

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

Use python app.py to define the app

11
New cards

What is the purpose of Flask(__name__)

creates the flask instance

12
New cards

How can you enable debug mode in Flask?

flask run CLI commandto start the development server.

13
New cards

Which of the following best describes a Flask route?

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