Browse Source

A few fixes in the English docs

pull/14015/head
Nils Lindemann 3 weeks ago
parent
commit
5ef106935a
  1. 2
      docs/en/docs/tutorial/debugging.md
  2. 4
      docs/en/docs/tutorial/query-params-str-validations.md

2
docs/en/docs/tutorial/debugging.md

@ -62,7 +62,7 @@ from myapp import app
# Some more code # Some more code
``` ```
in that case, the automatically created variable inside of `myapp.py` will not have the variable `__name__` with a value of `"__main__"`. in that case inside of `myapp.py` the automatically created variable `__name__` will not have the value `"__main__"`.
So, the line: So, the line:

4
docs/en/docs/tutorial/query-params-str-validations.md

@ -250,14 +250,10 @@ q: str | None = None
But we are now declaring it with `Query`, for example like: But we are now declaring it with `Query`, for example like:
//// tab | Annotated
```Python ```Python
q: Annotated[str | None, Query(min_length=3)] = None q: Annotated[str | None, Query(min_length=3)] = None
``` ```
////
So, when you need to declare a value as required while using `Query`, you can simply not declare a default value: So, when you need to declare a value as required while using `Query`, you can simply not declare a default value:
{* ../../docs_src/query_params_str_validations/tutorial006_an_py39.py hl[9] *} {* ../../docs_src/query_params_str_validations/tutorial006_an_py39.py hl[9] *}

Loading…
Cancel
Save