Complete the code to generate the URL for a static file named 'style.css'.
url = url_for([1], filename='style.css')
The url_for function uses the endpoint name static to generate URLs for static files.
Complete the code to generate the URL for a static image file named 'logo.png' inside the 'images' folder.
url = url_for('static', filename=[1])
The filename argument should include the folder path relative to the static folder, so 'images/logo.png' is correct.
Fix the error in the code to correctly generate the URL for 'script.js' in the static folder.
url = url_for([1], filename='script.js')
The correct endpoint for static files is 'static'. Using any other name will cause an error.
Fill both blanks to generate the URL for 'main.css' inside the 'css' folder in static files.
url = url_for([1], filename=[2])
The endpoint is 'static' and the filename should include the folder path 'css/main.css'.
Fill all three blanks to generate the URL for 'app.js' inside the 'js' folder in static files with a query parameter 'v=2'.
url = url_for([1], filename=[2], [3])
The endpoint is 'static', filename includes folder 'js/app.js', and the query parameter is 'v=2'.