Update typing_route.py
This commit is contained in:
parent
e488045687
commit
d399194b6c
1 changed files with 2 additions and 1 deletions
|
|
@ -41,7 +41,8 @@ def tuple_status_enum() -> tuple[str, int]:
|
||||||
def tuple_headers() -> tuple[str, dict[str, str]]:
|
def tuple_headers() -> tuple[str, dict[str, str]]:
|
||||||
return "Hello, World!", {"Content-Type": "text/plain"}
|
return "Hello, World!", {"Content-Type": "text/plain"}
|
||||||
|
|
||||||
|
#Returns "index.html" when "/template" or "/template" with parameter "name" included is accessed by the user
|
||||||
|
#"name" is passed as an argument for the html document when rendering it only if it was specified in the url
|
||||||
@app.route("/template")
|
@app.route("/template")
|
||||||
@app.route("/template/<name>")
|
@app.route("/template/<name>")
|
||||||
def return_template(name: str | None = None) -> str:
|
def return_template(name: str | None = None) -> str:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue