mirror of
https://github.com/m-lamonaca/dev-notes.git
synced 2025-06-08 18:57:12 +00:00
Fix typos
This commit is contained in:
parent
76550dfa3c
commit
5c0799df7f
118 changed files with 1150 additions and 1602 deletions
|
@ -34,14 +34,14 @@ Converter Type | Accepts
|
|||
`uuid` | UUID strings
|
||||
|
||||
```python
|
||||
@app.route("/user/<string:username>") # hanle URL at runtime
|
||||
@app.route("/user/<string:username>") # handle URL at runtime
|
||||
def profile(username):
|
||||
return f"{escape(username)}'s profile'"
|
||||
```
|
||||
|
||||
## Redirection
|
||||
|
||||
`url_for(endpoint, **values)` is used to redirect passing keyeworderd arguments. It can be used in combination with `@app.route("/<value>")` to accept the paassed arguments.
|
||||
`url_for(endpoint, **values)` is used to redirect passing keyworded arguments. It can be used in combination with `@app.route("/<value>")` to accept the passed arguments.
|
||||
|
||||
```py
|
||||
from flask import Flask, redirect, url_for
|
||||
|
@ -137,7 +137,7 @@ In `parent_template.html`:
|
|||
|
||||
The content of the block will be filled by the child class.
|
||||
|
||||
In `child_template.hmtl`:
|
||||
In `child_template.html`:
|
||||
|
||||
```html
|
||||
{% extends "parent_template.html" %}
|
||||
|
|
|
@ -27,7 +27,7 @@ In `login.html`:
|
|||
|
||||
```html
|
||||
<html>
|
||||
<!-- action="#" goes to page itsef but with # at the end of the URL -->
|
||||
<!-- action="#" goes to page itself but with # at the end of the URL -->
|
||||
<form action="#" method="post">
|
||||
<input type="text" name="field name">
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue