Complete the code to register a blueprint with a URL prefix.
app.register_blueprint(admin_bp, url_prefix=[1])The URL prefix must start with a slash to correctly prefix all routes in the blueprint.
Complete the code to define a blueprint with a name and import name.
admin_bp = Blueprint([1], __name__)The first argument to Blueprint is the blueprint's name as a string.
Fix the error in the route decorator to use the blueprint's URL prefix correctly.
@admin_bp.route([1]) def dashboard(): return "Admin Dashboard"
Routes inside a blueprint should be relative to the blueprint's URL prefix, so no leading slash is used.
Fill both blanks to create a blueprint and register it with a URL prefix.
admin_bp = Blueprint([1], __name__) app.register_blueprint(admin_bp, url_prefix=[2])
The blueprint name is 'admin' and the URL prefix must start with a slash '/admin'.
Fill all three blanks to define a blueprint, add a route, and register it with a URL prefix.
admin_bp = Blueprint([1], __name__) @admin_bp.route([2]) def home(): return "Welcome" app.register_blueprint(admin_bp, url_prefix=[3])
The blueprint is named 'admin'. The route inside the blueprint is relative and uses '/'. The URL prefix is '/admin'.