]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🌐 Update translations for tr (update-outdated) (#14831)
authorSebastián Ramírez <tiangolo@gmail.com>
Thu, 5 Feb 2026 15:56:49 +0000 (07:56 -0800)
committerGitHub <noreply@github.com>
Thu, 5 Feb 2026 15:56:49 +0000 (16:56 +0100)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
docs/tr/docs/advanced/wsgi.md
docs/tr/docs/index.md

index 442f83a59a508b50b8dd47e351c9b8d57e4c01a1..6f6b10b68af708fba5d46c3240e1388c28df8793 100644 (file)
@@ -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 }
 
index 9cffd4274fbd380d931086e18a184ef2df08a37c..16c425f5d7656ede08f9cbc8ccf690ac1f2fb481 100644 (file)
@@ -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 (<a href="https://github.com/R
 
 Body'yi Pydantic sayesinde standart Python tiplerini kullanarak tanımlayalım.
 
-```Python hl_lines="4  9-12  25-27"
-from typing import Union
-
+```Python hl_lines="2  7-10 23-25"
 from fastapi import FastAPI
 from pydantic import BaseModel
 
@@ -300,7 +294,7 @@ app = FastAPI()
 class Item(BaseModel):
     name: str
     price: float
-    is_offer: Union[bool, None] = None
+    is_offer: bool | None = None
 
 
 @app.get("/")
@@ -309,7 +303,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}