This repository has been archived by the owner on Jul 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from mboersma/flask-refresh
Update flask version and README.md example output
- Loading branch information
Showing
4 changed files
with
88 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
import os | ||
""" | ||
Example python app with the Flask framework: http://flask.pocoo.org/ | ||
""" | ||
|
||
from os import environ | ||
|
||
from flask import Flask | ||
from flask import render_template | ||
|
||
|
||
app = Flask(__name__) | ||
|
||
|
||
@app.route('/') | ||
def hello(): | ||
return 'Powered by {}'.format(os.environ.get('POWERED_BY', 'Deis!')) | ||
def index(): | ||
return render_template('index.html', | ||
powered_by=environ.get('POWERED_BY', 'Deis')) | ||
|
||
if __name__ == '__main__': | ||
# Bind to PORT if defined, otherwise default to 5000. | ||
port = int(os.environ.get('PORT', 5000)) | ||
port = int(environ.get('PORT', 5000)) | ||
app.run(host='0.0.0.0', port=port) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Flask==0.9 | ||
Jinja2==2.6 | ||
gunicorn==0.17.2 | ||
Flask==0.10.1 | ||
Jinja2==2.7.3 | ||
gunicorn==19.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Powered by {{ powered_by }} |