- Sort Score
- Result 10 results
- Languages All
Results 441 - 450 of 924 for docs_src (0.34 sec)
-
docs/ko/docs/advanced/templates.md
## 템플릿과 정적 파일 템플릿 내에서 `url_for()`를 사용할 수 있으며, 예를 들어 `name="static"`으로 마운트한 `StaticFiles`와 함께 사용할 수 있습니다. ```jinja hl_lines="4" {!../../docs_src/templates/templates/item.html!} ``` 이 예제에서는 `static/styles.css`에 있는 CSS 파일에 연결될 것입니다: ```CSS hl_lines="4" {!../../docs_src/templates/static/styles.css!} ``` 그리고 `StaticFiles`를 사용하고 있으므로, 해당 CSS 파일은 **FastAPI** 애플리케이션에서 `/static/styles.css` URL로 자동 제공됩니다.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 3.7K bytes - Viewed (0) -
docs/ru/docs/how-to/separate-openapi-schemas.md
Предположим, у вас есть Pydantic‑модель со значениями по умолчанию, как здесь: {* ../../docs_src/separate_openapi_schemas/tutorial001_py310.py ln[1:7] hl[7] *} ### Модель для входа { #model-for-input } Если использовать эту модель как входную, как здесь: {* ../../docs_src/separate_openapi_schemas/tutorial001_py310.py ln[1:15] hl[14] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Sep 30 11:37:11 UTC 2025 - 6.9K bytes - Viewed (0) -
tests/test_tutorial/test_python_types/test_tutorial008b.py
params=[ pytest.param("tutorial008b_py39"), pytest.param("tutorial008b_py310", marks=needs_py310), ], ) def get_module(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.python_types.{request.param}") return mod def test_process_items(module: ModuleType): with patch("builtins.print") as mock_print: module.process_item("a") assert mock_print.call_count == 1Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 637 bytes - Viewed (0) -
docs/ko/docs/tutorial/schema-extra-example.md
여기 이를 위한 몇가지 방식이 있습니다. ## Pydantic 모델 속 추가 JSON 스키마 데이터 생성된 JSON 스키마에 추가될 Pydantic 모델을 위한 `examples`을 선언할 수 있습니다. //// tab | Pydantic v2 {* ../../docs_src/schema_extra_example/tutorial001_py310.py hl[13:24] *} //// //// tab | Pydantic v1 {* ../../docs_src/schema_extra_example/tutorial001_pv1_py310.py hl[13:23] *} //// 추가 정보는 있는 그대로 해당 모델의 **JSON 스키마** 결과에 추가되고, API 문서에서 사용합니다. //// tab | Pydantic v2Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Nov 09 16:39:20 UTC 2024 - 10.7K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial001b.py
from fastapi.testclient import TestClient from docs_src.custom_response.tutorial001b_py39 import app client = TestClient(app) def test_get_custom_response(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"item_id": "Foo"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial005.py
from fastapi.testclient import TestClient from docs_src.custom_response.tutorial005_py39 import app client = TestClient(app) def test_get(): response = client.get("/") assert response.status_code == 200, response.text assert response.text == "Hello World" def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 985 bytes - Viewed (0) -
tests/test_tutorial/test_python_types/test_tutorial011.py
pytest.param("tutorial011_py310", marks=needs_py310), ], ) def test_run_module(module_name: str): with patch("builtins.print") as mock_print: runpy.run_module(f"docs_src.python_types.{module_name}", run_name="__main__") assert mock_print.call_count == 2 call_args = [str(arg.args[0]) for arg in mock_print.call_args_list] assert call_args == [
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 691 bytes - Viewed (0) -
docs/en/docs/tutorial/testing.md
It has a `POST` operation that could return several errors. Both *path operations* require an `X-Token` header. {* ../../docs_src/app_testing/app_b_an_py310/main.py *} ### Extended testing file { #extended-testing-file } You could then update `test_main.py` with the extended tests: {* ../../docs_src/app_testing/app_b_an_py310/test_main.py *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 6.1K bytes - Viewed (0) -
docs/es/docs/tutorial/body-fields.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 2.6K bytes - Viewed (0) -
docs/en/docs/advanced/response-cookies.md
## Use a `Response` parameter { #use-a-response-parameter } You can declare a parameter of type `Response` in your *path operation function*. And then you can set cookies in that *temporal* response object. {* ../../docs_src/response_cookies/tutorial002_py39.py hl[1, 8:9] *} And then you can return any object you need, as you normally would (a `dict`, a database model, etc).Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 2.3K bytes - Viewed (0)