From b4f4a930a39b8ec19da1cdaf3f2396de81b5625a Mon Sep 17 00:00:00 2001 From: Scott Clay Date: Fri, 5 Oct 2018 10:59:45 +0100 Subject: [PATCH 1/7] Made application.py PEP8 complient by fixing two lines for E302 and W292. --- application.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application.py b/application.py index a86beaa6d..591872ebf 100644 --- a/application.py +++ b/application.py @@ -1,6 +1,7 @@ from flask import Flask app = Flask(__name__) + @app.route("/") def hello(): - return "Hello World!" \ No newline at end of file + return "Hello World!" From 7842644d356e9223576a2e82de58ebf07992f423 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2019 13:51:35 +0000 Subject: [PATCH 2/7] Bump werkzeug from 0.14.1 to 0.15.3 Bumps [werkzeug](https://github.com/pallets/werkzeug) from 0.14.1 to 0.15.3. - [Release notes](https://github.com/pallets/werkzeug/releases) - [Changelog](https://github.com/pallets/werkzeug/blob/master/CHANGES.rst) - [Commits](https://github.com/pallets/werkzeug/compare/0.14.1...0.15.3) Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 404d3cf1f..99cb23149 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,4 @@ Flask==1.0.2 itsdangerous==0.24 Jinja2==2.10 MarkupSafe==1.0 -Werkzeug==0.14.1 \ No newline at end of file +Werkzeug==0.15.3 \ No newline at end of file From c133e23b18245bbbfa197187f5cd1c45db535ca9 Mon Sep 17 00:00:00 2001 From: Kraig Brockschmidt Date: Tue, 22 Sep 2020 10:07:50 -0700 Subject: [PATCH 3/7] Update requirements.txt --- requirements.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/requirements.txt b/requirements.txt index 99cb23149..32e2d2715 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1 @@ -click==6.7 -Flask==1.0.2 -itsdangerous==0.24 -Jinja2==2.10 -MarkupSafe==1.0 -Werkzeug==0.15.3 \ No newline at end of file +Flask>=1.0,<=1.1.2 From 168cd1e822c72cc31f58d6470bea609c2be65207 Mon Sep 17 00:00:00 2001 From: Kraig Brockschmidt Date: Tue, 22 Sep 2020 14:29:34 -0700 Subject: [PATCH 4/7] Fix phrase to match screenshots --- application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application.py b/application.py index 591872ebf..3cf7d9387 100644 --- a/application.py +++ b/application.py @@ -4,4 +4,4 @@ @app.route("/") def hello(): - return "Hello World!" + return "Hello, World!" From 9569abaf6f39ae72496e9641c6c57f4f97ae4294 Mon Sep 17 00:00:00 2001 From: Kraig Brockschmidt Date: Tue, 22 Sep 2020 16:58:26 -0700 Subject: [PATCH 5/7] Rename application.py to app.py Doing so allows the associated article to drop the set FLASK_APP step for simplicity. Also update .gitignore for VS Code, and update the readme. --- .gitignore | 5 +++++ README.md | 6 +++--- application.py => app.py | 1 - 3 files changed, 8 insertions(+), 4 deletions(-) rename application.py => app.py (99%) diff --git a/.gitignore b/.gitignore index 72364f99f..441a11ffd 100644 --- a/.gitignore +++ b/.gitignore @@ -81,9 +81,14 @@ celerybeat-schedule # virtualenv venv/ ENV/ +.venv/ # Spyder project settings .spyderproject # Rope project settings .ropeproject + +# Visual Studio Code +.vscode/ + diff --git a/README.md b/README.md index 3f21465ef..8a2e9e91e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ --- page_type: sample -description: "This is a minimal sample app that demonstrates how to run a Python Flask application on Azure App Service on Linux." +description: "A minimal sample app that can be used to demonstrate deploying Flask apps to Azure App Service on Linux." languages: - python products: @@ -10,9 +10,9 @@ products: # Python Flask sample for Azure App Service (Linux) -This is a minimal sample app that demonstrates how to run a Python Flask application on Azure App Service on Linux. +This is a minimal Flask app that can be deployed to Azure App Service on Linux. -For more information, please see the [Python on App Service quickstart](https://docs.microsoft.com/azure/app-service/containers/quickstart-python). +For instructions on running and deploying the code, see [Quickstart: Create a Python app in Azure App Service on Linux](https://docs.microsoft.com/azure/app-service/quickstart-python). ## Contributing diff --git a/application.py b/app.py similarity index 99% rename from application.py rename to app.py index 3cf7d9387..7f8a1f2e8 100644 --- a/application.py +++ b/app.py @@ -1,7 +1,6 @@ from flask import Flask app = Flask(__name__) - @app.route("/") def hello(): return "Hello, World!" From 3f4653bca1a5709d9436c8dc32c41f82f90e2add Mon Sep 17 00:00:00 2001 From: Chris Harris Date: Thu, 31 Mar 2022 12:09:30 -0700 Subject: [PATCH 6/7] Update version to Flask 2 Flask 1 returns an import error [cannot import name 'escape' from 'jinja2'] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 32e2d2715..a246e0f91 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -Flask>=1.0,<=1.1.2 +Flask>=2.0,<=2.1.1 From 8239188b516e8bf3882d02094d81c477b29c5c66 Mon Sep 17 00:00:00 2001 From: JimacoMS4 <84105740+JimacoMS4@users.noreply.github.com> Date: Thu, 21 Dec 2023 14:52:41 -0800 Subject: [PATCH 7/7] Remove versioning from Flask in requiremnts.txt to get rid of Werkzeug version bug. This is a simple app and doesn't need to be pinned to a version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a246e0f91..e3e9a71d9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -Flask>=2.0,<=2.1.1 +Flask