mirror of
https://github.com/docker/awesome-compose.git
synced 2025-04-28 23:31:47 +02:00
Fixed formatting changes
Signed-off-by: ajeetraina <ajeetraina@gmail.com>
This commit is contained in:
parent
0614fd5369
commit
3030c1358d
5 changed files with 10 additions and 16 deletions
|
@ -1,4 +1,3 @@
|
|||
# compose_flask/app.py
|
||||
from flask import Flask
|
||||
from redis import Redis
|
||||
|
||||
|
@ -8,8 +7,8 @@ redis = Redis(host='redis', port=6379)
|
|||
@app.route('/')
|
||||
def hello():
|
||||
redis.incr('hits')
|
||||
return 'This webpage has been viewed %s time(s).' % redis.get('hits')
|
||||
|
||||
counter = str(redis.get('hits'),'utf-8')
|
||||
return "This webpage has been viewed "+counter+" time(s)"
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(host="0.0.0.0", debug=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue