From 221bc6c5fff6f3e94b3967e289e1c4e3a5f63a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Y=C3=BBki=20Vachot?= Date: Mon, 18 Oct 2021 09:13:17 +0200 Subject: [PATCH] Update --- app.py | 6 +++--- static/css/style.css | 6 ++++++ templates/index.html | 11 +++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 static/css/style.css create mode 100644 templates/index.html diff --git a/app.py b/app.py index 418e7e2..0054bd1 100644 --- a/app.py +++ b/app.py @@ -1,7 +1,7 @@ import os import sys -from flask import Flask, request +from flask import Flask, request, render_template from contextlib import closing from urllib.request import urlopen import json @@ -23,8 +23,8 @@ def config(): # put application's code here @app.route('/') -def hello_world(): # put application's code here - return 'Hello World!' +def index(): + return render_template('index.html') # Recherche d'une ville diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..2eee0d5 --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,6 @@ +h1 { + border: 2px #eee solid; + color: red; + text-align: center; + padding: 10px; +} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..7d0da28 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,11 @@ + + + + + + Flask App + + +

Welcome to Flask

+ + \ No newline at end of file