mirror of https://github.com/docker/docs.git
Merge pull request #21446 from AJDempsey/patch-3
Update gettingstarted.md to use f-string
This commit is contained in:
commit
ef93015779
|
@ -59,7 +59,7 @@ Make sure you have:
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def hello():
|
def hello():
|
||||||
count = get_hit_count()
|
count = get_hit_count()
|
||||||
return 'Hello World! I have been seen {} times.\n'.format(count)
|
return f'Hello World! I have been seen {count} times.\n'
|
||||||
```
|
```
|
||||||
|
|
||||||
In this example, `redis` is the hostname of the redis container on the
|
In this example, `redis` is the hostname of the redis container on the
|
||||||
|
@ -273,7 +273,7 @@ To see Compose Watch in action:
|
||||||
message to `Hello from Docker!`:
|
message to `Hello from Docker!`:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
return 'Hello from Docker! I have been seen {} times.\n'.format(count)
|
return f'Hello from Docker! I have been seen {count} times.\n'
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Refresh the app in your browser. The greeting should be updated, and the
|
2. Refresh the app in your browser. The greeting should be updated, and the
|
||||||
|
|
Loading…
Reference in New Issue