From da9e101d5007dbb35bfe4fa695bbc2e22b42d568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 5 Feb 2026 07:56:49 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20Update=20translations=20for=20tr?= =?UTF-8?q?=20(update-outdated)=20(#14831)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: github-actions[bot] --- docs/tr/docs/advanced/wsgi.md | 22 +++++++++++++++++++--- docs/tr/docs/index.md | 18 ++++++------------ 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/docs/tr/docs/advanced/wsgi.md b/docs/tr/docs/advanced/wsgi.md index 442f83a59a..6f6b10b68a 100644 --- a/docs/tr/docs/advanced/wsgi.md +++ b/docs/tr/docs/advanced/wsgi.md @@ -1,18 +1,34 @@ # WSGI'yi Dahil Etme - Flask, Django ve Diğerleri { #including-wsgi-flask-django-others } -WSGI uygulamalarını [Sub Applications - Mounts](sub-applications.md){.internal-link target=_blank}, [Behind a Proxy](behind-a-proxy.md){.internal-link target=_blank} bölümlerinde gördüğünüz gibi mount edebilirsiniz. +WSGI uygulamalarını [Alt Uygulamalar - Mount Etme](sub-applications.md){.internal-link target=_blank}, [Bir Proxy Arkasında](behind-a-proxy.md){.internal-link target=_blank} bölümlerinde gördüğünüz gibi mount edebilirsiniz. Bunun için `WSGIMiddleware`'ı kullanabilir ve bunu WSGI uygulamanızı (örneğin Flask, Django vb.) sarmalamak için kullanabilirsiniz. ## `WSGIMiddleware` Kullanımı { #using-wsgimiddleware } -`WSGIMiddleware`'ı import etmeniz gerekir. +/// info | Bilgi + +Bunun için `a2wsgi` kurulmalıdır; örneğin `pip install a2wsgi` ile. + +/// + +`WSGIMiddleware`'ı `a2wsgi` paketinden import etmeniz gerekir. Ardından WSGI (örn. Flask) uygulamasını middleware ile sarmalayın. Ve sonra bunu bir path'in altına mount edin. -{* ../../docs_src/wsgi/tutorial001_py39.py hl[2:3,3] *} +{* ../../docs_src/wsgi/tutorial001_py39.py hl[1,3,23] *} + +/// note | Not + +Önceden, `fastapi.middleware.wsgi` içindeki `WSGIMiddleware`'ın kullanılması öneriliyordu, ancak artık kullanımdan kaldırıldı. + +Bunun yerine `a2wsgi` paketini kullanmanız önerilir. Kullanım aynıdır. + +Sadece `a2wsgi` paketinin kurulu olduğundan emin olun ve `WSGIMiddleware`'ı `a2wsgi` içinden doğru şekilde import edin. + +/// ## Kontrol Edelim { #check-it } diff --git a/docs/tr/docs/index.md b/docs/tr/docs/index.md index 9cffd4274f..16c425f5d7 100644 --- a/docs/tr/docs/index.md +++ b/docs/tr/docs/index.md @@ -161,8 +161,6 @@ $ pip install "fastapi[standard]" Şu içerikle `main.py` adında bir dosya oluşturalım: ```Python -from typing import Union - from fastapi import FastAPI app = FastAPI() @@ -174,7 +172,7 @@ def read_root(): @app.get("/items/{item_id}") -def read_item(item_id: int, q: Union[str, None] = None): +def read_item(item_id: int, q: str | None = None): return {"item_id": item_id, "q": q} ``` @@ -183,9 +181,7 @@ def read_item(item_id: int, q: Union[str, None] = None): Eğer kodunuz `async` / `await` kullanıyorsa, `async def` kullanın: -```Python hl_lines="9 14" -from typing import Union - +```Python hl_lines="7 12" from fastapi import FastAPI app = FastAPI() @@ -197,7 +193,7 @@ async def read_root(): @app.get("/items/{item_id}") -async def read_item(item_id: int, q: Union[str, None] = None): +async def read_item(item_id: int, q: str | None = None): return {"item_id": item_id, "q": q} ``` @@ -288,9 +284,7 @@ Alternatif otomatik dokümantasyonu göreceksiniz (