Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Fix for disabling the loading of environment variabes #175

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/en/guide/deployment/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ $ export MYAPP_REQUEST_TIMEOUT=10
You can also disable environment variable loading completely.
:--:1
```python
app = Sanic(__name__, load_env=False)
app = Sanic(__name__, env_prefix=None)
```
:---

Expand Down
4 changes: 2 additions & 2 deletions src/ja/guide/deployment/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ $ export SANIC_REQUEST_TIMEOUT=10
$ export MYAPP_REQUEST_TIMEOUT=10
```
```python
>>> app = Sanic(__name__, load_env='MYAPP_')
>>> app = Sanic(__name__, env_prefix='MYAPP_')
>>> print(app.config.REQUEST_TIMEOUT)
10
```
Expand All @@ -68,7 +68,7 @@ $ export MYAPP_REQUEST_TIMEOUT=10
環境変数のロードを完全に無効にすることもできます。
:--:1
```python
app = Sanic(__name__, load_env=False)
app = Sanic(__name__, env_prefix=None)
```
:---

Expand Down
4 changes: 2 additions & 2 deletions src/zh/guide/deployment/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ $ export MYAPP_REQUEST_TIMEOUT=10
```

```python
>>> app = Sanic(__name__, load_env='MYAPP_')
>>> app = Sanic(__name__, env_prefix='MYAPP_')
>>> print(app.config.REQUEST_TIMEOUT)
10
```
Expand All @@ -85,7 +85,7 @@ $ export MYAPP_REQUEST_TIMEOUT=10
:--:1

```python
app = Sanic(__name__, load_env=False)
app = Sanic(__name__, env_prefix=None)
```

:---
Expand Down