stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Flask Web Development Flashcards | StudBud
Explore
/
Flask Web Development
Flask Web Development
22 terms
·
StudBud Administration
·
2 plays
Test your knowledge on Flask, a popular web development framework for Python
Flashcards
22 cards
F
Practice quiz
P
Host live
L
Questions
22
Answers
1
What is the purpose of 'url_for'?
Define routes
Create templates
Set form actions
Generate URLs dynamically
2
Which method is used to redirect after form submission?
forward()
return()
redirect()
route()
3
What is the purpose of 'request.method'?
Set response type
Check request type
Get form data
Define route
4
What is the purpose of 'flash' messages?
Display temporary messages
Send emails
Store user data
Create forms
5
Which library helps with form validation?
Flask-Login
Flask-Migrate
Flask-Mail
Flask-WTF
6
Which method is used to get form data in JSON?
request.data
request.form
request.json
request.body
7
What is a common way to define routes?
@app.url()
@app.path()
@app.link()
@app.route()
8
True or false: Flask forms can validate user input.
True
False
9
What is the purpose of CSRF protection?
Improve styling
Prevent form tampering
Enhance performance
Increase database size
10
True or false: Flask supports AJAX requests.
True
False
11
Which function retrieves form data?
request.form
request.get_data()
request.args
request.body
12
What is the purpose of the 'action' attribute?
Limit input length
Define input types
Set form styles
Specify form submission URL
13
True or false: Flask requires a database to run.
True
False
14
Which function is used to get query parameters?
request.params
request.get()
request.args
request.query()
15
True or false: Flask can serve static files.
False
True
16
True or false: Flask can handle file uploads.
False
True
17
What method is used to submit forms?
PUT
GET
DELETE
POST
18
True or false: Flask uses Jinja2 for templating.
False
True
19
True or false: Flask can be used with databases.
True
False
20
Which method is used to render templates?
render_form()
display_template()
create_template()
render_template()
21
True or false: Flask forms can only be text inputs.
False
True
22
Which method is used to handle errors?
@app.errorhandler()
@app.exception()
@app.fail()
@app.catch()